1CMP0067 2------- 3 4.. versionadded:: 3.8 5 6Honor language standard in :command:`try_compile` source-file signature. 7 8The :command:`try_compile` source file signature is intended to allow 9callers to check whether they will be able to compile a given source file 10with the current toolchain. In order to match compiler behavior, any 11language standard mode should match. However, CMake 3.7 and below did not 12do this. CMake 3.8 and above prefer to honor the language standard settings 13for ``C``, ``CXX`` (C++), and ``CUDA`` using the values of the variables: 14 15* :variable:`CMAKE_C_STANDARD` 16* :variable:`CMAKE_C_STANDARD_REQUIRED` 17* :variable:`CMAKE_C_EXTENSIONS` 18* :variable:`CMAKE_CXX_STANDARD` 19* :variable:`CMAKE_CXX_STANDARD_REQUIRED` 20* :variable:`CMAKE_CXX_EXTENSIONS` 21* :variable:`CMAKE_CUDA_STANDARD` 22* :variable:`CMAKE_CUDA_STANDARD_REQUIRED` 23* :variable:`CMAKE_CUDA_EXTENSIONS` 24 25This policy provides compatibility for projects that do not expect 26the language standard settings to be used automatically. 27 28The ``OLD`` behavior of this policy is to ignore language standard 29setting variables when generating the ``try_compile`` test project. 30The ``NEW`` behavior of this policy is to honor language standard 31setting variables. 32 33This policy was introduced in CMake version 3.8. Unlike most policies, 34CMake version |release| does *not* warn by default when this policy 35is not set and simply uses ``OLD`` behavior. See documentation of the 36:variable:`CMAKE_POLICY_WARNING_CMP0067 <CMAKE_POLICY_WARNING_CMP<NNNN>>` 37variable to control the warning. 38 39.. include:: DEPRECATED.txt 40