Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-01-14 10:57:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-01-14 10:57:58 +0300
commit15b97e799f66706a642104a9130bfc412fa01063 (patch)
treeebddc6db5a93255ca87ca834f0c1a996906189cf /build_files
parentd3c55337d3484a5897290e606e4b250b3b915965 (diff)
CMake: Silence messages about unordered map and shared pointer on second run
This variables are being cached anyway and can only be changed on first run, no need to keep reporting them again and again.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/macros.cmake29
1 files changed, 18 insertions, 11 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index a8e17c3b5ef..edc5cf925c9 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -810,17 +810,24 @@ macro(TEST_STDBOOL_SUPPORT)
HAVE_STDBOOL_H)
endmacro()
+# Only print message if running CMake first time
+macro(message_first_run)
+ if(FIRST_RUN)
+ message(${ARGV})
+ endif()
+endmacro()
+
macro(TEST_UNORDERED_MAP_SUPPORT)
# - Detect unordered_map availability
# Test if a valid implementation of unordered_map exists
# and define the include path
# This module defines
# HAVE_UNORDERED_MAP, whether unordered_map implementation was found
- #
+ #
# HAVE_STD_UNORDERED_MAP_HEADER, <unordered_map.h> was found
# HAVE_UNORDERED_MAP_IN_STD_NAMESPACE, unordered_map is in namespace std
# HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE, unordered_map is in namespace std::tr1
- #
+ #
# UNORDERED_MAP_INCLUDE_PREFIX, include path prefix for unordered_map, if found
# UNORDERED_MAP_NAMESPACE, namespace for unordered_map, if found
@@ -844,7 +851,7 @@ macro(TEST_UNORDERED_MAP_SUPPORT)
}"
HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
if(HAVE_UNORDERED_MAP_IN_STD_NAMESPACE)
- message(STATUS "Found unordered_map/set in std namespace.")
+ message_first_run(STATUS "Found unordered_map/set in std namespace.")
set(HAVE_UNORDERED_MAP "TRUE")
set(UNORDERED_MAP_INCLUDE_PREFIX "")
@@ -857,26 +864,26 @@ macro(TEST_UNORDERED_MAP_SUPPORT)
}"
HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
- message(STATUS "Found unordered_map/set in std::tr1 namespace.")
+ message_first_run(STATUS "Found unordered_map/set in std::tr1 namespace.")
set(HAVE_UNORDERED_MAP "TRUE")
set(UNORDERED_MAP_INCLUDE_PREFIX "")
set(UNORDERED_MAP_NAMESPACE "std::tr1")
else()
- message(STATUS "Found <unordered_map> but cannot find either std::unordered_map "
- "or std::tr1::unordered_map.")
+ message_first_run(STATUS "Found <unordered_map> but cannot find either std::unordered_map "
+ "or std::tr1::unordered_map.")
endif()
endif()
else()
CHECK_INCLUDE_FILE_CXX("tr1/unordered_map" HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
if(HAVE_UNORDERED_MAP_IN_TR1_NAMESPACE)
- message(STATUS "Found unordered_map/set in std::tr1 namespace.")
+ message_first_run(STATUS "Found unordered_map/set in std::tr1 namespace.")
set(HAVE_UNORDERED_MAP "TRUE")
set(UNORDERED_MAP_INCLUDE_PREFIX "tr1")
set(UNORDERED_MAP_NAMESPACE "std::tr1")
else()
- message(STATUS "Unable to find <unordered_map> or <tr1/unordered_map>. ")
+ message_first_run(STATUS "Unable to find <unordered_map> or <tr1/unordered_map>. ")
endif()
endif()
endmacro()
@@ -913,7 +920,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
HAVE_SHARED_PTR_IN_STD_NAMESPACE)
if(HAVE_SHARED_PTR_IN_STD_NAMESPACE)
- message("-- Found shared_ptr in std namespace using <memory> header.")
+ message_first_run("-- Found shared_ptr in std namespace using <memory> header.")
set(SHARED_PTR_FOUND TRUE)
else()
CHECK_CXX_SOURCE_COMPILES("#include <memory>
@@ -923,7 +930,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
}"
HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE)
- message("-- Found shared_ptr in std::tr1 namespace using <memory> header.")
+ message_first_run("-- Found shared_ptr in std::tr1 namespace using <memory> header.")
set(SHARED_PTR_TR1_NAMESPACE TRUE)
set(SHARED_PTR_FOUND TRUE)
endif()
@@ -944,7 +951,7 @@ macro(TEST_SHARED_PTR_SUPPORT)
}"
HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
if(HAVE_SHARED_PTR_IN_TR1_NAMESPACE_FROM_TR1_MEMORY_HEADER)
- message("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.")
+ message_first_run("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header.")
set(SHARED_PTR_TR1_MEMORY_HEADER TRUE)
set(SHARED_PTR_TR1_NAMESPACE TRUE)
set(SHARED_PTR_FOUND TRUE)