mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 23:22:02 +03:00
c07261c5ca
Summary: This updates the top-level CMakeLists.txt file to compute package version information, and expose this to C++ code in `eden-config.h`, and to Python code in a new `eden/config.py` module. Previously we exposed an `EDEN_VERSION` macro for the C++ code in `eden-config.h`, but this was not initialized or used anywhere. Now the top-level CMakeLists.txt file computes appropriate version information and exposes the package name, version, release, commit ID, and build time in these configuration files. The version selection logic in CMakeLists.txt based largely on the code that wez wrote for watchman in D20636833. Reviewed By: wez Differential Revision: D21000164 fbshipit-source-id: db1a1035f1eefec058bbad558d35e113005e454e
16 lines
572 B
C++
16 lines
572 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
#include "eden/fs/eden-config.h"
|
|
|
|
extern "C" {
|
|
const char* const Eden_BuildInfo_kPackageName = "${PROJECT_NAME}";
|
|
const char* const Eden_BuildInfo_kPackageVersion = "${EDEN_VERSION}";
|
|
const char* const Eden_BuildInfo_kPackageRelease = "${EDEN_RELEASE}";
|
|
const char* const Eden_BuildInfo_kRevision = "${EDEN_BUILD_REVISION}";
|
|
const uint64_t Eden_BuildInfo_kTimeUnix = ${EDEN_BUILD_TIME_UNIX};
|
|
}
|