Răsfoiți Sursa

Check for std::unordered_map only if we are building CMake

When CMake_TEST_EXTERNAL_CMAKE is set then we are not actually
building CMake so we do not need this check.
Brad King 10 ani în urmă
părinte
comite
b5906ed03a
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      CMakeLists.txt

+ 3 - 1
CMakeLists.txt

@@ -48,7 +48,9 @@ if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
     set(CMAKE_CXX_STANDARD 11)
   endif()
 endif()
-include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx11_unordered_map.cmake)
+if(NOT CMake_TEST_EXTERNAL_CMAKE)
+  include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx11_unordered_map.cmake)
+endif()
 
 # option to set the internal encoding of CMake to UTF-8
 option(CMAKE_ENCODING_UTF8 "Use UTF-8 encoding internally." ON)