diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-02-01 19:48:25 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2017-02-02 17:25:28 (GMT) |
commit | f26ca5a1953e7f260bc23d30c5d35cc071a6f6ab (patch) | |
tree | a9882bba5a543e66c5b1ba520b950f0e0cbc3f82 /Tests/Module/WriteCompilerDetectionHeader | |
parent | 2b0256c5ade94ca19467fd42075b3c22bd3856f2 (diff) | |
download | CMake-f26ca5a1953e7f260bc23d30c5d35cc071a6f6ab.zip CMake-f26ca5a1953e7f260bc23d30c5d35cc071a6f6ab.tar.gz CMake-f26ca5a1953e7f260bc23d30c5d35cc071a6f6ab.tar.bz2 |
Tests/Module/WCDH: write multi_file_compiler_detection.h before using it
This was broken in commit 98e6d1e5e426c491e04faa746c11746002e6a69d
(Tests/Module/WCDH: make it work with only C features defined) when all C tests
were made accessible even if no C++ features are available, but the header was
only created if C++ features are available. Fix it by creating the header
unconditionally before any checks on the available features.
Diffstat (limited to 'Tests/Module/WriteCompilerDetectionHeader')
-rw-r--r-- | Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 7957ab8..a8406dd 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -20,6 +20,17 @@ write_compiler_detection_header( ${cxx_known_features} ${c_known_features} ) +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/multi_file_compiler_detection.h" + PREFIX MULTI + OUTPUT_FILES_VAR multi_files + OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support" + COMPILERS GNU Clang AppleClang MSVC SunPro Intel + VERSION 3.1 + FEATURES + ${cxx_known_features} ${c_known_features} +) + macro(set_defines target true_defs false_defs) set(defines) foreach(def ${true_defs}) @@ -116,17 +127,6 @@ add_executable(WriteCompilerDetectionHeader main.cpp) set_property(TARGET WriteCompilerDetectionHeader PROPERTY CXX_STANDARD 98) set_defines(WriteCompilerDetectionHeader "${true_defs}" "${false_defs}") -write_compiler_detection_header( - FILE "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/multi_file_compiler_detection.h" - PREFIX MULTI - OUTPUT_FILES_VAR multi_files - OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support" - COMPILERS GNU Clang AppleClang MSVC SunPro Intel - VERSION 3.1 - FEATURES - ${cxx_known_features} ${c_known_features} -) - add_executable(multi_files multi_files.cpp) set_property(TARGET multi_files PROPERTY CXX_STANDARD 98) target_include_directories(multi_files PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files) |