diff options
author | Brad King <brad.king@kitware.com> | 2017-05-08 14:26:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-08 14:26:48 (GMT) |
commit | 86edc5b6a5f9ef74d8807a6b90d209cce4e3a2d7 (patch) | |
tree | 7d621372296f5d87438cce7d1fa005bdc92b73a9 /CMakeLists.txt | |
parent | 7b2d529bdef9f6a5fa2bc3665a6b88cf52b110e1 (diff) | |
download | CMake-86edc5b6a5f9ef74d8807a6b90d209cce4e3a2d7.zip CMake-86edc5b6a5f9ef74d8807a6b90d209cce4e3a2d7.tar.gz CMake-86edc5b6a5f9ef74d8807a6b90d209cce4e3a2d7.tar.bz2 |
Choose compiler-specific flags earlier in CMake's own build
Add the flags early enough be used in the checks for C++ features.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4dcf2f0..6b88538 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,10 @@ if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD) endif() endif() if(NOT CMake_TEST_EXTERNAL_CMAKE) + # include special compile flags for some compilers + include(CompileFlags.cmake) + + # check for available C++ features include(${CMake_SOURCE_DIR}/Source/Checks/cm_cxx_features.cmake) endif() @@ -648,9 +652,6 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) include(${CMake_SOURCE_DIR}/Tests/CMakeInstall.cmake) endif() - # include special compile flags for some compilers - include(CompileFlags.cmake) - # no clue why we are testing for this here include(CheckSymbolExists) CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV) |