diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 10:38:46 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 10:38:46 +0300 |
commit | 90e827ba660b3346d554e73c25bc1ad229fd736e (patch) | |
tree | 4559cfceb869d7791cfb94ddf2c706f8d75e9b8d /CMakeLists.txt | |
parent | 2af7637f207c420af602f43e514b1b20e7cfc718 (diff) |
CMake: De-duplicate checks around unordered maps and shared pointer
Previously several areas were calling TEST_SHARED_PTR_SUPPORT and
TEST_UNORDERED_MAP_SUPPORT which isn't that bad on it's own but
was causing some quite verbose output with same information line
printed multiple times. additionally, what's more worse, define flags
for Ceres were duplicated in main CMakeLists and Ceres's CMakeLists.
Now we've got a single place where checks for those classes are
happening and other areas are simply checking for variables set by
those check macros, keeping CMake output clean and nice.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 73d219e0e1c..e91f4b503a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -731,6 +731,9 @@ if(HAVE_STDBOOL_H) add_definitions(-DHAVE_STDBOOL_H) endif() +TEST_SHARED_PTR_SUPPORT() +TEST_UNORDERED_MAP_SUPPORT() + if(WITH_AUDASPACE) if(WITH_SYSTEM_AUDASPACE) set(AUDASPACE_DEFINITIONS @@ -2604,7 +2607,6 @@ endif() if(WITH_LIBMV) set(CERES_DEFINES) - TEST_SHARED_PTR_SUPPORT() if(SHARED_PTR_FOUND) if(SHARED_PTR_TR1_MEMORY_HEADER) list(APPEND CERES_DEFINES -DCERES_TR1_MEMORY_HEADER) @@ -2616,7 +2618,6 @@ if(WITH_LIBMV) message(FATAL_ERROR "Ceres: Unable to find shared_ptr.") endif() - TEST_UNORDERED_MAP_SUPPORT() if(HAVE_STD_UNORDERED_MAP_HEADER) if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE) list(APPEND CERES_DEFINES -DCERES_STD_UNORDERED_MAP) |