cmlib/CMLibCompilerFeaturesHPPGenerate.cmake

24 lines
545 B
CMake
Raw Normal View History

2019-02-12 16:31:17 +00:00
include(WriteCompilerDetectionHeader)
set(OUTPUT_FILE ${CMAKE_BINARY_DIR}/include/compiler_features.hpp)
if(CMLIB_GENERATED_HEADERS_PATH)
set(OUTPUT_FILE ${CMLIB_GENERATED_HEADERS_PATH}/compiler_features.hpp)
endif()
2019-12-03 16:23:14 +00:00
write_compiler_detection_header(
FILE ${OUTPUT_FILE}
2019-12-03 16:23:14 +00:00
PREFIX ${CMLIB_PROJECT_NAME_CANONICAL}
COMPILERS GNU Clang MSVC Intel
FEATURES
cxx_nullptr
cxx_override
cxx_alignas
cxx_alignof
cxx_attributes
cxx_auto_type
cxx_constexpr
cxx_digit_separators
cxx_range_for)
unset(OUTPUT_FILE)