mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
adb0571dcc
Summary: Put code using the usage service behind an `EDEN_HAVE_USAGE_SERVICE` macro. Previously the C++ code was simply guarded by a `__linux__` check, and the CMake code did not have a guard at all. This caused builds from the GitHub repository to fail on Linux, since the code attempted to use the usage service client which was not available. Reviewed By: xavierd Differential Revision: D30797846 fbshipit-source-id: 32a0905d0e1d594c3cfb04a466aea456d0bd6ca1
38 lines
1.2 KiB
C
38 lines
1.2 KiB
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.
|
|
*/
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
/*
|
|
* We put the build version and timestamp in a .cpp file to avoid changing
|
|
* this header any time CMake is re-run. We don't want to have to re-compile
|
|
* files that include this header simply because the build timestamp changed.
|
|
*/
|
|
extern "C" {
|
|
extern const char* const Eden_BuildInfo_kPackageName;
|
|
extern const char* const Eden_BuildInfo_kPackageVersion;
|
|
extern const char* const Eden_BuildInfo_kPackageRelease;
|
|
extern const char* const Eden_BuildInfo_kRevision;
|
|
extern const uint64_t Eden_BuildInfo_kTimeUnix;
|
|
}
|
|
|
|
#define EDEN_PACKAGE_NAME (::Eden_BuildInfo_kPackageName)
|
|
#define EDEN_VERSION (::Eden_BuildInfo_kPackageVersion)
|
|
#define EDEN_RELEASE (::Eden_BuildInfo_kPackageRelease)
|
|
#define EDEN_BUILD_REVISION (::Eden_BuildInfo_kRevision)
|
|
#define EDEN_BUILD_TIME_UNIX (::Eden_BuildInfo_kTimeUnix)
|
|
|
|
#define EDEN_ETC_EDEN_DIR "${ETC_EDEN_DIR}"
|
|
|
|
#cmakedefine EDEN_HAVE_GIT
|
|
#cmakedefine EDEN_HAVE_ROCKSDB
|
|
#cmakedefine EDEN_HAVE_SELINUX
|
|
#cmakedefine EDEN_HAVE_SQLITE3
|
|
#cmakedefine EDEN_HAVE_SYSTEMD
|
|
#cmakedefine EDEN_HAVE_USAGE_SERVICE
|