2022-05-06 09:49:46 +00:00
|
|
|
include_guard(GLOBAL)
|
|
|
|
|
|
|
|
|
2021-12-08 11:32:04 +00:00
|
|
|
function(myx_cmake_write_compiler_detection_header)
|
|
|
|
|
|
|
|
if(${CMAKE_VERSION} VERSION_LESS "3.6.0")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(WriteCompilerDetectionHeader)
|
|
|
|
|
|
|
|
set(OUTPUT_FILE ${CMAKE_BINARY_DIR}/include/compiler_features.hpp)
|
|
|
|
if(MYX_CMAKE_GENERATED_HEADER_FILENAME)
|
|
|
|
set(OUTPUT_FILE ${MYX_CMAKE_GENERATED_HEADER_FILENAME})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
write_compiler_detection_header(
|
|
|
|
FILE ${OUTPUT_FILE}
|
|
|
|
PREFIX ${MYX_CMAKE_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)
|
|
|
|
endfunction()
|
|
|
|
|