cmake write_compiler_detection_header examples

Signatures

write_compiler_detection_header(
  FILE <file>
  PREFIX <prefix>
  [OUTPUT_FILES_VAR <output_files_var> OUTPUT_DIR <output_dir>]
  COMPILERS <compiler> [...]
  FEATURES <feature> [...]
  [BARE_FEATURES <feature> [...]]
  [VERSION <version>]
  [PROLOG <prolog>]
  [EPILOG <epilog>]
  [ALLOW_UNKNOWN_COMPILERS]
  [ALLOW_UNKNOWN_COMPILER_VERSIONS]
)

Examples

robotology/yarp src/libYARP_conf/src/CMakeLists.txt :77

write_compiler_detection_header(
  FILE "${CMAKE_CURRENT_BINARY_DIR}/yarp/conf/compiler.h"
  PREFIX YARP
  COMPILERS
    GNU
    Clang
    AppleClang
    MSVC
  FEATURES ${_cxx_known_features}
  VERSION 3.5.0
  PROLOG "${_compiler_dox}\n${_compiler_prolog}\n// BEGIN <content generated by write_compiler_detection_header>"
  EPILOG "// END <content generated by write_compiler_detection_header>\n\n${_compiler_epilog_swig}\n${_compiler_epilog_doxygen}\n${_compiler_epilog}")

cginternals/glbinding source/glbinding/CMakeLists.txt :196

write_compiler_detection_header(
    FILE ${feature_file}
    PREFIX ${target_id}
    COMPILERS AppleClang Clang GNU MSVC
    FEATURES
        cxx_thread_local
        cxx_constexpr
        cxx_attribute_deprecated
        cxx_noexcept
    VERSION 3.15
)

aau-cns/mars_lib source/mars/CMakeLists.txt :167

write_compiler_detection_header(
        FILE ${feature_file}
        PREFIX ${target_id}
        COMPILERS AppleClang Clang GNU MSVC
        FEATURES cxx_alignas cxx_alignof cxx_constexpr cxx_final cxx_noexcept cxx_nullptr cxx_sizeof_member cxx_thread_local
        VERSION 3.2
    )

cginternals/globjects source/globjects/CMakeLists.txt :318

write_compiler_detection_header(
        FILE ${feature_file}
        PREFIX ${target_id}
        COMPILERS AppleClang Clang GNU MSVC
        FEATURES cxx_thread_local
        VERSION 3.2
    )

samdauwe/BabylonCpp src/CMakeLists.txt :43

write_compiler_detection_header(
    FILE ${FEATURE_FILE}
    PREFIX ${BABYLON_UPPER}
    COMPILERS AppleClang Clang GNU MSVC
    FEATURES cxx_alignas cxx_alignof cxx_constexpr cxx_final cxx_noexcept cxx_nullptr cxx_sizeof_member cxx_thread_local
    VERSION 3.2
)