Squashed 'third_party/gflags/' changes from f0523f1..7e70988
7e70988 fix: PVS Studio warnings
754d332 fix: No extern template declaration for MSVC <12.0
82456f2 fix: Declare FlagRegisterer c’tor explicit template instanations as extern in header
3e2e349 fix: Declare FALGS_no##name variables as static
c0b1add fix: Import with GFLAGS_USE_TARGET_NAMESPACE=ON
f1ea012 fix: Import with or without gflags:: namespace
b0c4cd2 fix: Define both 'gflags' and 'gflags::gflags' alias targets
04c8ce7 fix: Indentation, use spaces instead of real tabs
d4a050d Merge pull request #247 from Mizux/master
48677f9 fix missing-field-initializers warnings on gcc
6e53655 Fix V728 excessive check
cad38c9 Set postfixes for generated libraries based on buildtype
2c49763 Fix build on some clang variants
660603a doc: Update documentation on how to use Bazel
518267d Remove installation guide's recommendation to use Bazel's bind().
f7228d7 Use CMake namespace gflags:: for export and alias target
8b39845 Remove uneeded enable_test()
9ab4d11 Add VERSION to project
e292e04 Use += for appends
6d1c363 Add Bazel-on-Windows support
7759264 repair wrong namespace problem
2334846 Removed unused functions.
60784b5 Remove using ::fLS::clstring;
57ceb0e enh: Move CMake defines to separate header, unused by Bazel
7d36353 Fix typo in BUILD
aa2d0f7 fix: Remove obsolete and unused CleanFileName code
4663c80 cmake: Add convenience uninstall target (#221)
46f73f8 Release v2.2.1
66d4386 enh: AppVeyor builds with different toolchains (copied from gtest project)
6348ea9 fix: Check HAVE_STDINT_H or HAVE_INTTYPES_H for older MSVC versions
3d5bc48 git: Ignore symbolic links created by Bazel build tool
74603f5 fix: Static code analyzer error regarding strncmp with empty kRootDir string
4a694e8 Use inttypes.h on VC++ 2013 and up
21c7bcd Fix CMake macro special variable usage (#216)
95ffb27 Fix static initialization order fiasco caused by global registry lock (#215)
80ebb42 Install dll's to correct path (#213)
652651b Fix statically linked gflags library with MSVC
9314597 Mark single argument constructors in mutex.h as explicit.
30dbc81 Changed include directory in bazel build
8935ef4 enh: Link to online documentation in README
20858a4 fix: Enable language C for older CMake versions when needed (#196)
ac6834e fix: Remove unused program_name variable
22ed2ce fix: Include utils by file instead of CMAKE_MODULE_PATH search
f8a0efe Release v2.2.0
2f336a2 doc: //external:gflags_nothreads Bazel target
c6b9377 git: Ignore builds/ subdirectory
84ab952 doc: Update use of gflags with Bazel documentation
b872d6b enh: Bazel BUILD, add WORKSPACE file (#192)
37c4c58 add: Bazel WORKSPACE file
37e2867 enh: Refactored Bazel BUILD rules
8f2c22a Revert "enh: Rename private sources, include public headers with rel path"
ea6144e enh: Rename private sources, include public headers with rel path
86d67a3 fix: Add -lpthread to link Bazel BUILD options (#189)
c94a60e enh: Configure and install pkg-config .pc file
3e7ef74 enh: Set GFLAGS_IS_A_DLL in INTERFACE_COMPILE_DEFINITIONS
1846983 fix: Ensure installation path uses forward slashes
3886da5 enh: Add option to add installation to CMake’s package registry
6c0ee00 fix: Copy missing IMPORTED_IMPLIB_<CONFIG> gflags target property
3064f63 enh: Avoid use of install(EXPORTS) FILE option
14c0e93 Convert dashes to underscores for unknown flags (#177)
cce68f0 Fix error messages to not truncate to 255 characters (#175)
f4eace1 fix: Validate modified flags only once (#173)
408061b fix make error for lacking namespace (#170)
7d31c02 Fix unsigned comparison error in gflags_reporting.cc (#168)
a69b254 Fix Windows linker errors and warnings. (#166)
15394d3 Add shared library build to the AppVeyor CI config. (#167)
e58e530 Remove filter for excluded tests from AppVeyor config. (#165)
435f949 test: Travis CI build static+shared in Release+Debug (#164)
22e4a53 fix: Run strip_flags_binary test only for release configurations (#163)
c713d2e test: Run AppVeyor build via cmake --build and run tests. (#162)
b16653e fix: Typo in gflags_strip_flags_test.cmake script
ec4b5da doc: Add AppVeyor status badge to README
f0be9c8 Add initial AppVeyor config. (#161)
78cab6c doc: Add Travis CI status badge to README
4667f41 Enable Travis CI for Linux and OSX builds (#160)
a5a1b28 Merge pull request #158 from dreamer-dead/use-type-name-enum
7ba9921 Fix wrong type comparison and outdated OfType() usage.
3051942 Fix indentation and remove outdated assert.
3c0ad4f Extract common code from FlagRegisterer to reduce size.
a1e461d Change template FlagValue::OfType() to Type() getter.
46ea10f Do not pass flag type as a char literal when registering a new flag.
fe57e5a Merge pull request #156 from dreamer-dead/fix-flag-value-typename
fa26638 Fix unittests expectations related to uint32.
5ef4c3c Fix uint32 type name.
2e4159f Merge pull request #155 from dreamer-dead/add-missing-reference
3e946c9 Add missing reference symbol to a function parameter.
546819b Merge pull request #152 from Liuchang0812/master
0c17f1e fix bug about LRLF
ac1a925 fix #151: Ubuntu package name in INSTALL instructions
d701cea Merge pull request #150 from LuminateWireless/fix-bazel-build
7ae23fd Add gendir to the include path so that building with bazel doesn't complain config.h can't be found.
8de80b9 Merge pull request #149 from hevy-CC4477/master
eff38cb fix test compilation
9353bca Merge pull request #147 from bazineta/master
81d8a92 Correct FV_MAX_INDEX
eaf0534 Support uint32 as flag type
74bcd20 Merge PR #137 with change of SOVERSION to <major>.<minor>
4534195 fix: Change SOVERSION to <major>.<minor> for 2.x release versions
5e30706 Merge pull request #143 from schuhschuh/fix-bazel-bulid-osx
687b2c5 fix #133: Use awk instead of sed which would require different options on OS X
5844199 Merge pull request #142 from schuhschuh/master
1c8285f mod: Update doc with new find_package COMPONENTS or subproject use
12d810d Merge pull request #141 from schuhschuh/master
389ef3f Merge branch 'master' of github.com:gflags/gflags
752c632 fix: Include order of config.h and gflags.h in unit test
f9e69b3 Merge pull request #140 from schuhschuh/enh-#117-gflags-subproject-support
7a21c16 cmake: Rename targets to gflags[_nothreads]_(static|shared), support find_package COMPONENTS
a4382e5 cmake: Require CMake 2.8.12 in NC tests
2de6bf3 cmake: Change CMake package configuration variable name prefix to GFLAGS_
91e16ee cmake: Add CMake variable to cache only when gflags is not a subproject
b686469 git: Add CMakeLists.txt.user Qt Creator configuration to ignore list
e50698c Merge pull request #139 from schuhschuh/master
18cb422 fix: Require CMake version 2.8.12 in test project
799e910 fix: Include private config.h in gflags_unittest.cc
abe4b10 fix: Package URLs
221f327 Revert "#136 Move test binaries to Testing/bin"
2a3454c fix: DLL import/export defines for unit tests, remove obsolete config_for_unittests.h
545e9df fix: Add missing include guards to gflags/config.h
6bd636c cmake: Clean up static library filename suffix code from PR #126
dd48d70 Merge pull request #126 from hevy-CC4477/master
9ef0d52 enh: Add usage of DEFINE_validator to test project
02f3189 #136 Move test binaries to Testing/bin
92865ce #51 #138 Use std::string instead const char * for global "constants"
8ac4bc4 fix: Pass std::string directly, no need for c_str() call
b90a325 properly export the .so minor version
3ae911f mod: Update doc
762f9cb #51 Call ShutDownCommandLineFlags for (manual) valgrind test
7a69001 #51 Use static StringFlagDestructor to destruct string objects allocated by placement new
3f968fc Merge pull request #133 from earhart/master
40b85b1 Add bazel support
f9fa305 Merge pull request #131 from sbc100/no_threads
b572a72 Define NO_THREADS in when building without threads
03bebcb Merge pull request #129 from Nazg-Gul/master
366e9d3 Fix some compilation warnings with MSVC 2015
4f100cb Resolve several missing declarations warnings
d78b00d handle generation of dynamic and static library on windows.
9db8289 #125 Fix unused typedef/variable warning for static assertion
4e61c45 #124 Remove using namespace from mutex.h
Change-Id: I61f02738b43ce97c825345375af77a44231165f4
git-subtree-dir: third_party/gflags
git-subtree-split: 7e709881881c2663569cd49a93e5c8d9228d868e
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c32bce3..9dec647 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,29 +1,106 @@
-cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+## CMake configuration file of gflags project
+##
+## This CMakeLists.txt defines some gflags specific configuration variables
+## using the "gflags_define" utility macro. The default values of these variables
+## can be overridden either on the CMake command-line using the -D option of
+## the cmake command or in a super-project which includes the gflags source
+## tree by setting the GFLAGS_<varname> CMake variables before adding the
+## gflags source directory via CMake's "add_subdirectory" command. Only when
+## the non-cached variable GFLAGS_IS_SUBPROJECT has a value equivalent to FALSE,
+## these configuration variables are added to the CMake cache so they can be
+## edited in the CMake GUI. By default, GFLAGS_IS_SUBPROJECT is set to TRUE when
+## the CMAKE_SOURCE_DIR is not identical to the directory of this CMakeLists.txt
+## file, i.e., the top-level directory of the gflags project source tree.
+##
+## When this project is a subproject (GFLAGS_IS_SUBPROJECT is TRUE), the default
+## settings are such that only the static single-threaded library is built without
+## installation of the gflags files. The "gflags::gflags" target is in this case an ALIAS
+## library target for the "gflags_nothreads_static" library target. Targets which
+## depend on the gflags library should link to the "gflags::gflags" library target.
+##
+## Example CMakeLists.txt of user project which requires separate gflags installation:
+## cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+##
+## project(Foo)
+##
+## find_package(gflags REQUIRED)
+##
+## add_executable(foo src/foo.cc)
+## target_link_libraries(foo gflags::gflags)
+##
+## Example CMakeLists.txt of user project which requires separate single-threaded static gflags installation:
+## cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+##
+## project(Foo)
+##
+## find_package(gflags COMPONENTS nothreads_static)
+##
+## add_executable(foo src/foo.cc)
+## target_link_libraries(foo gflags::gflags)
+##
+## Example CMakeLists.txt of super-project which contains gflags source tree:
+## cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+##
+## project(Foo)
+##
+## add_subdirectory(gflags)
+##
+## add_executable(foo src/foo.cc)
+## target_link_libraries(foo gflags::gflags)
+##
+## Variables to configure the source files:
+## - GFLAGS_IS_A_DLL
+## - GFLAGS_NAMESPACE
+## - GFLAGS_ATTRIBUTE_UNUSED
+## - GFLAGS_INTTYPES_FORMAT
+##
+## Variables to configure the build:
+## - GFLAGS_SOVERSION
+## - GFLAGS_BUILD_SHARED_LIBS
+## - GFLAGS_BUILD_STATIC_LIBS
+## - GFLAGS_BUILD_gflags_LIB
+## - GFLAGS_BUILD_gflags_nothreads_LIB
+## - GFLAGS_BUILD_TESTING
+## - GFLAGS_BUILD_PACKAGING
+##
+## Variables to configure the installation:
+## - GFLAGS_INCLUDE_DIR
+## - GFLAGS_LIBRARY_INSTALL_DIR or LIB_INSTALL_DIR or LIB_SUFFIX
+## - GFLAGS_INSTALL_HEADERS
+## - GFLAGS_INSTALL_SHARED_LIBS
+## - GFLAGS_INSTALL_STATIC_LIBS
+
+cmake_minimum_required (VERSION 3.0.2 FATAL_ERROR)
if (POLICY CMP0042)
cmake_policy (SET CMP0042 NEW)
endif ()
+if (POLICY CMP0048)
+ cmake_policy (SET CMP0048 NEW)
+endif ()
+
# ----------------------------------------------------------------------------
# includes
-set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
-include (utils)
+include ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/utils.cmake")
# ----------------------------------------------------------------------------
# package information
-set (PACKAGE_NAME "gflags")
-set (PACKAGE_VERSION "2.2.0")
-set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
-set (PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
-set (PACKAGE_BUGREPORT "https://github.com/schuhschuh/gflags/issues")
+set (PACKAGE_NAME "gflags")
+set (PACKAGE_VERSION "2.2.1")
+set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set (PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
+set (PACKAGE_BUGREPORT "https://github.com/gflags/gflags/issues")
+set (PACKAGE_DESCRIPTION "A commandline flags library that allows for distributed flags.")
+set (PACKAGE_URL "http://gflags.github.io/gflags")
-project (${PACKAGE_NAME} CXX)
-if (CMAKE_VERSION VERSION_LESS 100)
+project (${PACKAGE_NAME} VERSION ${PACKAGE_VERSION} LANGUAGES CXX)
+if (CMAKE_VERSION VERSION_LESS 3.4)
# C language still needed because the following required CMake modules
# (or their dependencies, respectively) are not correctly handling
- # the case where only CXX is enabled.
- # - CheckTypeSize.cmake (fixed in CMake 3.1, cf. http://www.cmake.org/Bug/view.php?id=14056)
- # - FindThreads.cmake (--> CheckIncludeFiles.cmake <--)
+ # the case where only CXX is enabled
+ # - CheckTypeSize.cmake (fixed in CMake 3.1, cf. https://cmake.org/Bug/view.php?id=14056)
+ # - FindThreads.cmake (fixed in CMake 3.4, cf. https://cmake.org/Bug/view.php?id=14905)
enable_language (C)
endif ()
@@ -34,17 +111,45 @@
PACKAGE_VERSION_PATCH
)
-set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}")
+# shared library ABI version number, can be overridden by package maintainers
+# using -DGFLAGS_SOVERSION=XXX on the command-line
+if (GFLAGS_SOVERSION)
+ set (PACKAGE_SOVERSION "${GFLAGS_SOVERSION}")
+else ()
+ # TODO: Change default SOVERSION back to PACKAGE_VERSION_MAJOR with the
+ # next increase of major version number (i.e., 3.0.0 -> SOVERSION 3)
+ # The <major>.<minor> SOVERSION should be used for the 2.x releases
+ # versions only which temporarily broke the API by changing the default
+ # namespace from "google" to "gflags".
+ set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
+endif ()
+
+# when gflags is included as subproject (e.g., as Git submodule/subtree) in the source
+# tree of a project that uses it, no variables should be added to the CMake cache;
+# users may set the non-cached variable GFLAGS_IS_SUBPROJECT before add_subdirectory(gflags)
+if (NOT DEFINED GFLAGS_IS_SUBPROJECT)
+ if ("^${CMAKE_SOURCE_DIR}$" STREQUAL "^${PROJECT_SOURCE_DIR}$")
+ set (GFLAGS_IS_SUBPROJECT FALSE)
+ else ()
+ set (GFLAGS_IS_SUBPROJECT TRUE)
+ endif ()
+endif ()
+
+# prefix for package variables in CMake configuration file
+string (TOUPPER "${PACKAGE_NAME}" PACKAGE_PREFIX)
+
+# convert file path on Windows with back slashes to path with forward slashes
+# otherwise this causes an issue with the cmake_install.cmake script
+file (TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)
# ----------------------------------------------------------------------------
# options
-if (NOT GFLAGS_NAMESPACE)
- # maintain binary backwards compatibility with gflags library version <= 2.0,
- # but at the same time enable the use of the preferred new "gflags" namespace
- set (GFLAGS_NAMESPACE "google;${PACKAGE_NAME}" CACHE STRING "Name(s) of library namespace (separate multiple options by semicolon)")
- mark_as_advanced (GFLAGS_NAMESPACE)
-endif ()
-set (GFLAGS_NAMESPACE_SECONDARY "${GFLAGS_NAMESPACE}")
+
+# maintain binary backwards compatibility with gflags library version <= 2.0,
+# but at the same time enable the use of the preferred new "gflags" namespace
+gflags_define (STRING NAMESPACE "Name(s) of library namespace (separate multiple options by semicolon)" "google;${PACKAGE_NAME}" "${PACKAGE_NAME}")
+gflags_property (NAMESPACE ADVANCED TRUE)
+set (GFLAGS_NAMESPACE_SECONDARY "${NAMESPACE}")
list (REMOVE_DUPLICATES GFLAGS_NAMESPACE_SECONDARY)
if (NOT GFLAGS_NAMESPACE_SECONDARY)
message (FATAL_ERROR "GFLAGS_NAMESPACE must be set to one (or more) valid C++ namespace identifier(s separated by semicolon \";\").")
@@ -57,46 +162,57 @@
list (GET GFLAGS_NAMESPACE_SECONDARY 0 GFLAGS_NAMESPACE)
list (REMOVE_AT GFLAGS_NAMESPACE_SECONDARY 0)
-option (BUILD_SHARED_LIBS "Request build of shared libraries." OFF)
-option (BUILD_STATIC_LIBS "Request build of static libraries (default if BUILD_SHARED_LIBS is OFF)." OFF)
-option (BUILD_gflags_LIB "Request build of the multi-threaded gflags library." ON)
-option (BUILD_gflags_nothreads_LIB "Request build of the single-threaded gflags library." ON)
-option (BUILD_PACKAGING "Enable build of distribution packages using CPack." OFF)
-option (BUILD_TESTING "Enable build of the unit tests and their execution using CTest." OFF)
-option (INSTALL_HEADERS "Request packaging of headers and other development files." ON)
+# cached build options when gflags is not a subproject, otherwise non-cached CMake variables
+# usage: gflags_define(BOOL <name> <doc> <default> [<subproject default>])
+gflags_define (BOOL BUILD_SHARED_LIBS "Request build of shared libraries." OFF OFF)
+gflags_define (BOOL BUILD_STATIC_LIBS "Request build of static libraries (default if BUILD_SHARED_LIBS is OFF)." OFF ON)
+gflags_define (BOOL BUILD_gflags_LIB "Request build of the multi-threaded gflags library." ON OFF)
+gflags_define (BOOL BUILD_gflags_nothreads_LIB "Request build of the single-threaded gflags library." ON ON)
+gflags_define (BOOL BUILD_PACKAGING "Enable build of distribution packages using CPack." OFF OFF)
+gflags_define (BOOL BUILD_TESTING "Enable build of the unit tests and their execution using CTest." OFF OFF)
+gflags_define (BOOL INSTALL_HEADERS "Request installation of headers and other development files." ON OFF)
+gflags_define (BOOL INSTALL_SHARED_LIBS "Request installation of shared libraries." ON ON)
+gflags_define (BOOL INSTALL_STATIC_LIBS "Request installation of static libraries." ON OFF)
+gflags_define (BOOL REGISTER_BUILD_DIR "Request entry of build directory in CMake's package registry." OFF OFF)
+gflags_define (BOOL REGISTER_INSTALL_PREFIX "Request entry of installed package in CMake's package registry." ON OFF)
-mark_as_advanced (CLEAR CMAKE_INSTALL_PREFIX)
-mark_as_advanced (CMAKE_CONFIGURATION_TYPES
- BUILD_STATIC_LIBS
- INSTALL_HEADERS)
-if (APPLE)
- mark_as_advanced(CMAKE_OSX_ARCHITECTURES
- CMAKE_OSX_DEPLOYMENT_TARGET
- CMAKE_OSX_SYSROOT)
-endif ()
+gflags_property (BUILD_STATIC_LIBS ADVANCED TRUE)
+gflags_property (INSTALL_HEADERS ADVANCED TRUE)
+gflags_property (INSTALL_SHARED_LIBS ADVANCED TRUE)
+gflags_property (INSTALL_STATIC_LIBS ADVANCED TRUE)
+
+if (NOT GFLAGS_IS_SUBPROJECT)
+ foreach (varname IN ITEMS CMAKE_INSTALL_PREFIX)
+ gflags_property (${varname} ADVANCED FALSE)
+ endforeach ()
+ foreach (varname IN ITEMS CMAKE_CONFIGURATION_TYPES CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET CMAKE_OSX_SYSROOT)
+ gflags_property (${varname} ADVANCED TRUE)
+ endforeach ()
+ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
+ gflags_set (CMAKE_BUILD_TYPE Release)
+ endif ()
+ if (CMAKE_CONFIGURATION_TYPES)
+ gflags_property (CMAKE_BUILD_TYPE STRINGS "${CMAKE_CONFIGURATION_TYPES}")
+ endif ()
+endif () # NOT GFLAGS_IS_SUBPROJECT
if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS)
set (BUILD_STATIC_LIBS ON)
endif ()
if (NOT BUILD_gflags_LIB AND NOT BUILD_gflags_nothreads_LIB)
- message (FATAL_ERROR "At least one of BUILD_gflags_LIB and BUILD_gflags_nothreads_LIB must be ON.")
+ message (FATAL_ERROR "At least one of [GFLAGS_]BUILD_gflags_LIB and [GFLAGS_]BUILD_gflags_nothreads_LIB must be ON.")
endif ()
-if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
- set_property (CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release)
+gflags_define (STRING INCLUDE_DIR "Name of include directory of installed header files relative to CMAKE_INSTALL_PREFIX/include/" "${PACKAGE_NAME}")
+gflags_property (INCLUDE_DIR ADVANCED TRUE)
+file (TO_CMAKE_PATH "${INCLUDE_DIR}" INCLUDE_DIR)
+if (IS_ABSOLUTE INCLUDE_DIR)
+ message (FATAL_ERROR "[GFLAGS_]INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include/")
endif ()
-
-if (NOT GFLAGS_INCLUDE_DIR)
- set (GFLAGS_INCLUDE_DIR "${PACKAGE_NAME}" CACHE STRING "Name of include directory of installed header files")
- mark_as_advanced (GFLAGS_INCLUDE_DIR)
-else ()
- if (IS_ABSOLUTE GFLAGS_INCLUDE_DIR)
- message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include")
- endif ()
- if (GFLAGS_INCLUDE_DIR MATCHES "^\\.\\.[/\\]")
- message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must not start with parent directory reference (../)")
- endif ()
+if (INCLUDE_DIR MATCHES "^\\.\\.[/\\]")
+ message (FATAL_ERROR "[GFLAGS_]INCLUDE_DIR must not start with parent directory reference (../)")
endif ()
+set (GFLAGS_INCLUDE_DIR "${INCLUDE_DIR}")
# ----------------------------------------------------------------------------
# system checks
@@ -112,12 +228,22 @@
if (MSVC)
set (HAVE_SYS_TYPES_H 1)
- set (HAVE_STDINT_H 1)
set (HAVE_STDDEF_H 1) # used by CheckTypeSize module
- set (HAVE_INTTYPES_H 0)
set (HAVE_UNISTD_H 0)
set (HAVE_SYS_STAT_H 1)
set (HAVE_SHLWAPI_H 1)
+ if (MSVC_VERSION VERSION_LESS 1600)
+ check_include_file_cxx ("stdint.h" HAVE_STDINT_H)
+ bool_to_int (HAVE_STDINT_H) # used in #if directive
+ else ()
+ set (HAVE_STDINT_H 1)
+ endif ()
+ if (MSVC_VERSION VERSION_LESS 1800)
+ check_include_file_cxx ("inttypes.h" HAVE_INTTYPES_H)
+ bool_to_int (HAVE_INTTYPES_H) # used in #if directive
+ else ()
+ set (HAVE_INTTYPES_H 1)
+ endif ()
else ()
foreach (fname IN ITEMS unistd stdint inttypes sys/types sys/stat fnmatch)
string (TOUPPER "${fname}" FNAME)
@@ -126,19 +252,19 @@
check_include_file_cxx ("${fname}.h" HAVE_${FNAME}_H)
endif ()
endforeach ()
+ if (NOT HAVE_FNMATCH_H AND OS_WINDOWS)
+ check_include_file_cxx ("shlwapi.h" HAVE_SHLWAPI_H)
+ endif ()
# the following are used in #if directives not #ifdef
bool_to_int (HAVE_STDINT_H)
bool_to_int (HAVE_SYS_TYPES_H)
bool_to_int (HAVE_INTTYPES_H)
- if (NOT HAVE_FNMATCH_H AND OS_WINDOWS)
- check_include_file_cxx ("shlwapi.h" HAVE_SHLWAPI_H)
- endif ()
endif ()
-set (GFLAGS_INTTYPES_FORMAT "" CACHE STRING "Format of integer types: \"C99\" (uint32_t), \"BSD\" (u_int32_t), \"VC7\" (__int32)")
-set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY STRINGS "C99;BSD;VC7")
-mark_as_advanced (GFLAGS_INTTYPES_FORMAT)
-if (NOT GFLAGS_INTTYPES_FORMAT)
+gflags_define (STRING INTTYPES_FORMAT "Format of integer types: \"C99\" (uint32_t), \"BSD\" (u_int32_t), \"VC7\" (__int32)" "")
+gflags_property (INTTYPES_FORMAT STRINGS "C99;BSD;VC7")
+gflags_property (INTTYPES_FORMAT ADVANCED TRUE)
+if (NOT INTTYPES_FORMAT)
set (TYPES uint32_t u_int32_t)
if (MSVC)
list (INSERT TYPES 0 __int32)
@@ -150,29 +276,30 @@
endif ()
endforeach ()
if (HAVE_uint32_t)
- set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE C99)
+ gflags_set (INTTYPES_FORMAT C99)
elseif (HAVE_u_int32_t)
- set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE BSD)
+ gflags_set (INTTYPES_FORMAT BSD)
elseif (HAVE___int32)
- set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE VC7)
+ gflags_set (INTTYPES_FORMAT VC7)
else ()
- mark_as_advanced (CLEAR GFLAGS_INTTYPES_FORMAT)
+ gflags_property (INTTYPES_FORMAT ADVANCED FALSE)
message (FATAL_ERROR "Do not know how to define a 32-bit integer quantity on your system!"
" Neither uint32_t, u_int32_t, nor __int32 seem to be available."
- " Set GFLAGS_INTTYPES_FORMAT to either C99, BSD, or VC7 and try again.")
+ " Set [GFLAGS_]INTTYPES_FORMAT to either C99, BSD, or VC7 and try again.")
endif ()
endif ()
# use of special characters in strings to circumvent bug #0008226
-if ("^${GFLAGS_INTTYPES_FORMAT}$" STREQUAL "^WIN$")
- set_property (CACHE GFLAGS_INTTYPES_FORMAT PROPERTY VALUE VC7)
+if ("^${INTTYPES_FORMAT}$" STREQUAL "^WIN$")
+ gflags_set (INTTYPES_FORMAT VC7)
endif ()
-if (NOT GFLAGS_INTTYPES_FORMAT MATCHES "^(C99|BSD|VC7)$")
- message (FATAL_ERROR "Invalid value for GFLAGS_INTTYPES_FORMAT! Choose one of \"C99\", \"BSD\", or \"VC7\"")
+if (NOT INTTYPES_FORMAT MATCHES "^(C99|BSD|VC7)$")
+ message (FATAL_ERROR "Invalid value for [GFLAGS_]INTTYPES_FORMAT! Choose one of \"C99\", \"BSD\", or \"VC7\"")
endif ()
+set (GFLAGS_INTTYPES_FORMAT "${INTTYPES_FORMAT}")
set (GFLAGS_INTTYPES_FORMAT_C99 0)
set (GFLAGS_INTTYPES_FORMAT_BSD 0)
set (GFLAGS_INTTYPES_FORMAT_VC7 0)
-set ("GFLAGS_INTTYPES_FORMAT_${GFLAGS_INTTYPES_FORMAT}" 1)
+set ("GFLAGS_INTTYPES_FORMAT_${INTTYPES_FORMAT}" 1)
if (MSVC)
set (HAVE_strtoll 0)
@@ -184,26 +311,29 @@
endif ()
endif ()
-set (CMAKE_THREAD_PREFER_PTHREAD TRUE)
-find_package (Threads)
-if (Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
- set (HAVE_PTHREAD 1)
- check_type_size (pthread_rwlock_t RWLOCK LANGUAGE CXX)
+if (BUILD_gflags_LIB)
+ set (CMAKE_THREAD_PREFER_PTHREAD TRUE)
+ find_package (Threads)
+ if (Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
+ set (HAVE_PTHREAD 1)
+ check_type_size (pthread_rwlock_t RWLOCK LANGUAGE CXX)
+ else ()
+ set (HAVE_PTHREAD 0)
+ endif ()
+ if (UNIX AND NOT HAVE_PTHREAD)
+ if (CMAKE_HAVE_PTHREAD_H)
+ set (what "library")
+ else ()
+ set (what ".h file")
+ endif ()
+ message (FATAL_ERROR "Could not find pthread${what}. Check the log file"
+ "\n\t${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
+ "\nor disable the build of the multi-threaded gflags library (BUILD_gflags_LIB=OFF).")
+ endif ()
else ()
set (HAVE_PTHREAD 0)
endif ()
-if (UNIX AND NOT HAVE_PTHREAD AND BUILD_gflags_LIB)
- if (CMAKE_HAVE_PTHREAD_H)
- set (what "library")
- else ()
- set (what ".h file")
- endif ()
- message (FATAL_ERROR "Could not find pthread${what}. Check the log file"
- "\n\t${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log"
- "\nor disable the build of the multi-threaded gflags library (BUILD_gflags_LIB=OFF).")
-endif ()
-
# ----------------------------------------------------------------------------
# source files - excluding root subdirectory and/or .in suffix
set (PUBLIC_HDRS
@@ -226,6 +356,7 @@
endif ()
set (PRIVATE_HDRS
+ "defines.h"
"config.h"
"util.h"
"mutex.h"
@@ -244,19 +375,25 @@
# ----------------------------------------------------------------------------
# configure source files
-if (CMAKE_COMPILER_IS_GNUCXX)
- set (GFLAGS_ATTRIBUTE_UNUSED "__attribute((unused))")
-else ()
- set (GFLAGS_ATTRIBUTE_UNUSED)
+if (NOT DEFINED GFLAGS_ATTRIBUTE_UNUSED)
+ if (CMAKE_COMPILER_IS_GNUCXX)
+ set (GFLAGS_ATTRIBUTE_UNUSED "__attribute((unused))")
+ else ()
+ set (GFLAGS_ATTRIBUTE_UNUSED)
+ endif ()
endif ()
# whenever we build a shared library (DLL on Windows), configure the public
-# headers of the API for use of this library rather than the optionally
+# headers of the API for use of this shared library rather than the optionally
# also build statically linked library; users can override GFLAGS_DLL_DECL
-if (BUILD_SHARED_LIBS)
- set (GFLAGS_IS_A_DLL 1)
-else ()
- set (GFLAGS_IS_A_DLL 0)
+# in particular, this done by setting the INTERFACE_COMPILE_DEFINITIONS of
+# static libraries to include an empty definition for GFLAGS_DLL_DECL
+if (NOT DEFINED GFLAGS_IS_A_DLL)
+ if (BUILD_SHARED_LIBS)
+ set (GFLAGS_IS_A_DLL 1)
+ else ()
+ set (GFLAGS_IS_A_DLL 0)
+ endif ()
endif ()
configure_headers (PUBLIC_HDRS ${PUBLIC_HDRS})
@@ -265,31 +402,36 @@
# ----------------------------------------------------------------------------
# output directories
-set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin")
-set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
-set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib")
+if (NOT GFLAGS_IS_SUBPROJECT)
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "bin")
+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib")
+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib")
+endif ()
+# Set postfixes for generated libraries based on buildtype.
+set(CMAKE_RELEASE_POSTFIX "")
+set(CMAKE_DEBUG_POSTFIX "_debug")
# ----------------------------------------------------------------------------
# installation directories
if (OS_WINDOWS)
- set (RUNTIME_INSTALL_DIR Bin)
- set (LIBRARY_INSTALL_DIR Lib)
- set (INCLUDE_INSTALL_DIR Include)
- set (CONFIG_INSTALL_DIR CMake)
+ set (RUNTIME_INSTALL_DIR "bin")
+ set (LIBRARY_INSTALL_DIR "lib")
+ set (INCLUDE_INSTALL_DIR "include")
+ set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}")
+ set (PKGCONFIG_INSTALL_DIR)
else ()
set (RUNTIME_INSTALL_DIR bin)
# The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora
# package maintainers. Also package maintainers of other distribution
# packages need to be able to specify the name of the library directory.
- if (NOT LIB_INSTALL_DIR)
- set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
+ if (NOT GFLAGS_LIBRARY_INSTALL_DIR AND LIB_INSTALL_DIR)
+ set (GFLAGS_LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}")
endif ()
- set (LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}"
- CACHE PATH "Directory of installed libraries, e.g., \"lib64\""
- )
- mark_as_advanced (LIBRARY_INSTALL_DIR)
+ gflags_define (PATH LIBRARY_INSTALL_DIR "Directory of installed libraries, e.g., \"lib64\"" "lib${LIB_SUFFIX}")
+ gflags_property (LIBRARY_INSTALL_DIR ADVANCED TRUE)
set (INCLUDE_INSTALL_DIR include)
set (CONFIG_INSTALL_DIR ${LIBRARY_INSTALL_DIR}/cmake/${PACKAGE_NAME})
+ set (PKGCONFIG_INSTALL_DIR ${LIBRARY_INSTALL_DIR}/pkgconfig)
endif ()
# ----------------------------------------------------------------------------
@@ -298,59 +440,110 @@
# static vs. shared
foreach (TYPE IN ITEMS STATIC SHARED)
if (BUILD_${TYPE}_LIBS)
+ string (TOLOWER "${TYPE}" type)
# whether or not targets are a DLL
if (OS_WINDOWS AND "^${TYPE}$" STREQUAL "^SHARED$")
set (GFLAGS_IS_A_DLL 1)
else ()
set (GFLAGS_IS_A_DLL 0)
endif ()
- string (TOLOWER "${TYPE}" type)
+ # filename suffix for static libraries on Windows
+ if (OS_WINDOWS AND "^${TYPE}$" STREQUAL "^STATIC$")
+ set (type_suffix "_${type}")
+ else ()
+ set (type_suffix "")
+ endif ()
# multi-threaded vs. single-threaded
foreach (opts IN ITEMS "" _nothreads)
if (BUILD_gflags${opts}_LIB)
- add_library (gflags${opts}-${type} ${TYPE} ${GFLAGS_SRCS} ${PRIVATE_HDRS} ${PUBLIC_HDRS})
+ set (target_name "gflags${opts}_${type}")
+ add_library (${target_name} ${TYPE} ${GFLAGS_SRCS} ${PRIVATE_HDRS} ${PUBLIC_HDRS})
+ set_target_properties (${target_name} PROPERTIES
+ OUTPUT_NAME "gflags${opts}${type_suffix}"
+ VERSION "${PACKAGE_VERSION}"
+ SOVERSION "${PACKAGE_SOVERSION}"
+ )
set (include_dirs "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>")
if (INSTALL_HEADERS)
list (APPEND include_dirs "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>")
endif ()
- target_include_directories (gflags${opts}-${type}
+ target_include_directories (${target_name}
PUBLIC "${include_dirs}"
PRIVATE "${PROJECT_SOURCE_DIR}/src;${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}"
)
+ target_compile_definitions (${target_name} PUBLIC GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL})
if (opts MATCHES "nothreads")
- set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL};NOTHREADS")
- else ()
- set (defines "GFLAGS_IS_A_DLL=${GFLAGS_IS_A_DLL}")
- if (CMAKE_USE_PTHREADS_INIT)
- target_link_libraries (gflags${opts}-${type} ${CMAKE_THREAD_LIBS_INIT})
- endif ()
+ target_compile_definitions (${target_name} PRIVATE NO_THREADS)
+ elseif (CMAKE_USE_PTHREADS_INIT)
+ target_link_libraries (${target_name} ${CMAKE_THREAD_LIBS_INIT})
endif ()
- set_target_properties (
- gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}"
- OUTPUT_NAME "gflags${opts}"
- VERSION "${PACKAGE_VERSION}"
- SOVERSION "${PACKAGE_SOVERSION}"
- )
if (HAVE_SHLWAPI_H)
- target_link_libraries (gflags${opts}-${type} shlwapi.lib)
+ target_link_libraries (${target_name} shlwapi.lib)
endif ()
- if (NOT TARGET gflags${opts})
- add_custom_target (gflags${opts})
+ list (APPEND TARGETS ${target_name})
+ # add convenience make target for build of both shared and static libraries
+ if (NOT GFLAGS_IS_SUBPROJECT)
+ if (NOT TARGET gflags${opts})
+ add_custom_target (gflags${opts})
+ endif ()
+ add_dependencies (gflags${opts} ${target_name})
endif ()
- add_dependencies (gflags${opts} gflags${opts}-${type})
- list (APPEND TARGETS gflags${opts}-${type})
endif ()
endforeach ()
endif ()
endforeach ()
+# add ALIAS target for use in super-project, prefer static over shared, single-threaded over multi-threaded
+if (GFLAGS_IS_SUBPROJECT)
+ foreach (type IN ITEMS static shared)
+ foreach (opts IN ITEMS "_nothreads" "")
+ if (TARGET gflags${opts}_${type})
+ # Define "gflags" alias for super-projects treating targets of this library as part of their own project
+ # (also for backwards compatibility with gflags 2.2.1 which only defined this alias)
+ add_library (gflags ALIAS gflags${opts}_${type})
+ # Define "gflags::gflags" alias for projects that support both find_package(gflags) and add_subdirectory(gflags)
+ add_library (gflags::gflags ALIAS gflags${opts}_${type})
+ break ()
+ endif ()
+ endforeach ()
+ if (TARGET gflags::gflags)
+ break ()
+ endif ()
+ endforeach ()
+endif ()
+
# ----------------------------------------------------------------------------
# installation rules
+set (EXPORT_NAME ${PACKAGE_NAME}-targets)
file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}")
configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake" @ONLY)
configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake" @ONLY)
-install (TARGETS ${TARGETS} DESTINATION ${LIBRARY_INSTALL_DIR} EXPORT gflags-lib)
+if (BUILD_SHARED_LIBS AND INSTALL_SHARED_LIBS)
+ foreach (opts IN ITEMS "" _nothreads)
+ if (BUILD_gflags${opts}_LIB)
+ install (TARGETS gflags${opts}_shared
+ EXPORT ${EXPORT_NAME}
+ RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+ endif ()
+ endforeach ()
+endif ()
+if (BUILD_STATIC_LIBS AND INSTALL_STATIC_LIBS)
+ foreach (opts IN ITEMS "" _nothreads)
+ if (BUILD_gflags${opts}_LIB)
+ install (TARGETS gflags${opts}_static
+ EXPORT ${EXPORT_NAME}
+ RUNTIME DESTINATION ${RUNTIME_INSTALL_DIR}
+ LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR}
+ ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR}
+ )
+ endif ()
+ endforeach ()
+endif ()
+
if (INSTALL_HEADERS)
install (FILES ${PUBLIC_HDRS} DESTINATION ${INCLUDE_INSTALL_DIR}/${GFLAGS_INCLUDE_DIR})
install (
@@ -362,24 +555,50 @@
FILES "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake"
DESTINATION ${CONFIG_INSTALL_DIR}
)
- install (EXPORT gflags-lib DESTINATION ${CONFIG_INSTALL_DIR} FILE ${PACKAGE_NAME}-export.cmake)
+ install (
+ EXPORT ${EXPORT_NAME}
+ NAMESPACE ${PACKAGE_NAME}::
+ DESTINATION ${CONFIG_INSTALL_DIR}
+ )
+ install (
+ EXPORT ${EXPORT_NAME}
+ FILE ${PACKAGE_NAME}-nonamespace-targets.cmake
+ DESTINATION ${CONFIG_INSTALL_DIR}
+ )
if (UNIX)
install (PROGRAMS src/gflags_completions.sh DESTINATION ${RUNTIME_INSTALL_DIR})
endif ()
endif ()
+if (PKGCONFIG_INSTALL_DIR)
+ configure_file ("cmake/package.pc.in" "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}.pc" @ONLY)
+ install (FILES "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}.pc" DESTINATION "${PKGCONFIG_INSTALL_DIR}")
+endif ()
+
# ----------------------------------------------------------------------------
# support direct use of build tree
set (INSTALL_PREFIX_REL2CONFIG_DIR .)
-export (TARGETS ${TARGETS} FILE "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-export.cmake")
-export (PACKAGE gflags)
+export (
+ TARGETS ${TARGETS}
+ NAMESPACE ${PACKAGE_NAME}::
+ FILE "${PROJECT_BINARY_DIR}/${EXPORT_NAME}.cmake"
+)
+export (
+ TARGETS ${TARGETS}
+ FILE "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-nonamespace-targets.cmake"
+)
+if (REGISTER_BUILD_DIR)
+ export (PACKAGE ${PACKAGE_NAME})
+endif ()
+if (REGISTER_INSTALL_PREFIX)
+ register_gflags_package(${CONFIG_INSTALL_DIR})
+endif ()
configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake" @ONLY)
# ----------------------------------------------------------------------------
# testing - MUST follow the generation of the build tree config file
if (BUILD_TESTING)
include (CTest)
- enable_testing ()
add_subdirectory (test)
endif ()
@@ -393,10 +612,14 @@
"\n BUILD_SHARED_LIBS=ON"
"\n BUILD_STATIC_LIBS=OFF"
"\n INSTALL_HEADERS=OFF"
+ "\n INSTALL_SHARED_LIBS=ON"
"\nRecommended options for generation of development package:"
"\n BUILD_SHARED_LIBS=ON"
"\n BUILD_STATIC_LIBS=ON"
- "\n INSTALL_HEADERS=ON")
+ "\n INSTALL_HEADERS=ON"
+ "\n INSTALL_SHARED_LIBS=ON"
+ "\n INSTALL_STATIC_LIBS=ON"
+ )
endif ()
# default package generators
@@ -427,7 +650,7 @@
set (CPACK_PACKAGE_VERSION_MAJOR "${PACKAGE_VERSION_MAJOR}")
set (CPACK_PACKAGE_VERSION_MINOR "${PACKAGE_VERSION_MINOR}")
set (CPACK_PACKAGE_VERSION_PATCH "${PACKAGE_VERSION_PATCH}")
- set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "A commandline flags library that allows for distributed flags.")
+ set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PACKAGE_DESCRIPTION}")
set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/COPYING.txt")
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
@@ -439,7 +662,7 @@
# RPM package information -- used in cmake/package.cmake.in also for DEB
set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
set (CPACK_RPM_PACKAGE_LICENSE "BSD")
- set (CPACK_RPM_PACKAGE_URL "http://schuhschuh.github.com/gflags")
+ set (CPACK_RPM_PACKAGE_URL "${PACKAGE_URL}")
set (CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_LIST_DIR}/ChangeLog.txt")
if (INSTALL_HEADERS)
@@ -508,3 +731,11 @@
include (CPack)
endif () # BUILD_PACKAGING
+
+if (NOT GFLAGS_IS_SUBPROJECT AND NOT TARGET uninstall)
+ configure_file (
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" @ONLY
+ )
+ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
+endif ()