|
|
@@ -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)
|