WCDH: Add Intel to list of supported compilers
This commit is contained in:
parent
36f32ede8d
commit
15a6c9502d
|
@ -36,7 +36,7 @@
|
||||||
# PREFIX ClimbingStats
|
# PREFIX ClimbingStats
|
||||||
# OUTPUT_FILES_VAR support_files
|
# OUTPUT_FILES_VAR support_files
|
||||||
# OUTPUT_DIR compilers
|
# OUTPUT_DIR compilers
|
||||||
# COMPILERS GNU Clang MSVC
|
# COMPILERS GNU Clang MSVC Intel
|
||||||
# FEATURES cxx_variadic_templates
|
# FEATURES cxx_variadic_templates
|
||||||
# )
|
# )
|
||||||
# install(FILES
|
# install(FILES
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
# write_compiler_detection_header(
|
# write_compiler_detection_header(
|
||||||
# FILE climbingstats_compiler_detection.h
|
# FILE climbingstats_compiler_detection.h
|
||||||
# PREFIX ClimbingStats
|
# PREFIX ClimbingStats
|
||||||
# COMPILERS GNU Clang AppleClang MSVC
|
# COMPILERS GNU Clang AppleClang MSVC Intel
|
||||||
# FEATURES cxx_variadic_templates
|
# FEATURES cxx_variadic_templates
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
|
@ -323,6 +323,7 @@ function(write_compiler_detection_header
|
||||||
AppleClang
|
AppleClang
|
||||||
MSVC
|
MSVC
|
||||||
SunPro
|
SunPro
|
||||||
|
Intel
|
||||||
)
|
)
|
||||||
|
|
||||||
set(_hex_compilers ADSP Borland Embarcadero SunPro)
|
set(_hex_compilers ADSP Borland Embarcadero SunPro)
|
||||||
|
|
|
@ -11,7 +11,7 @@ get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES)
|
||||||
write_compiler_detection_header(
|
write_compiler_detection_header(
|
||||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h"
|
FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h"
|
||||||
PREFIX TEST
|
PREFIX TEST
|
||||||
COMPILERS GNU Clang AppleClang MSVC SunPro
|
COMPILERS GNU Clang AppleClang MSVC SunPro Intel
|
||||||
VERSION 3.1
|
VERSION 3.1
|
||||||
PROLOG "// something"
|
PROLOG "// something"
|
||||||
EPILOG "// more"
|
EPILOG "// more"
|
||||||
|
@ -61,7 +61,8 @@ endmacro()
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
|
||||||
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
|
OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
|
||||||
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
|
OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
|
||||||
OR CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
OR CMAKE_CXX_COMPILER_ID STREQUAL "SunPro"
|
||||||
|
OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||||
# False for C++98 mode.
|
# False for C++98 mode.
|
||||||
list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
|
list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS)
|
||||||
list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
|
list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES)
|
||||||
|
@ -80,7 +81,9 @@ endif()
|
||||||
|
|
||||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
|
if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
|
||||||
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
||||||
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"
|
||||||
|
OR CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||||
|
|
||||||
add_executable(C_undefined c_undefined.c)
|
add_executable(C_undefined c_undefined.c)
|
||||||
set_property(TARGET C_undefined PROPERTY C_STANDARD 90)
|
set_property(TARGET C_undefined PROPERTY C_STANDARD 90)
|
||||||
target_compile_options(C_undefined PRIVATE -Werror=undef)
|
target_compile_options(C_undefined PRIVATE -Werror=undef)
|
||||||
|
@ -104,7 +107,7 @@ write_compiler_detection_header(
|
||||||
PREFIX MULTI
|
PREFIX MULTI
|
||||||
OUTPUT_FILES_VAR multi_files
|
OUTPUT_FILES_VAR multi_files
|
||||||
OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support"
|
OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/compiler_multi_files/compiler_support"
|
||||||
COMPILERS GNU Clang AppleClang MSVC SunPro
|
COMPILERS GNU Clang AppleClang MSVC SunPro Intel
|
||||||
VERSION 3.1
|
VERSION 3.1
|
||||||
FEATURES
|
FEATURES
|
||||||
${cxx_known_features} ${c_known_features}
|
${cxx_known_features} ${c_known_features}
|
||||||
|
@ -142,7 +145,8 @@ set_defines(multi_files_11 "${true_defs}" "${false_defs}")
|
||||||
|
|
||||||
if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
|
if (CMAKE_C_COMPILER_ID STREQUAL "GNU"
|
||||||
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
OR CMAKE_C_COMPILER_ID STREQUAL "Clang"
|
||||||
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
|
OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"
|
||||||
|
OR CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||||
add_executable(WriteCompilerDetectionHeader_C11 main.c)
|
add_executable(WriteCompilerDetectionHeader_C11 main.c)
|
||||||
set_property(TARGET WriteCompilerDetectionHeader_C11 PROPERTY C_STANDARD 11)
|
set_property(TARGET WriteCompilerDetectionHeader_C11 PROPERTY C_STANDARD 11)
|
||||||
set_defines(WriteCompilerDetectionHeader_C11 "EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES;EXPECTED_COMPILER_C_RESTRICT" "")
|
set_defines(WriteCompilerDetectionHeader_C11 "EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES;EXPECTED_COMPILER_C_RESTRICT" "")
|
||||||
|
|
Loading…
Reference in New Issue