Files
CMake/Tests/RunCMake/try_compile/CMP0067-stderr.txt
T
Brad King f72ba42b7c try_compile: Add policy CMP0067 to honor language standards
Projects use `try_compile` to check if they will be able to compile some
particular source code.  When a language standard variable like
`CMAKE_CXX_STANDARD` is set, then the project intends to compile source
code using a compiler mode for that standard.  Therefore it makes sense
for `try_compile` to use that standard in the test project too.

Unfortunately this was not done when support for the
`CMAKE_CXX_STANDARD` variable was first implemented.  Add a policy to
introduce the improved behavior in a compatible way.

Closes: #16456
2016-12-06 08:58:42 -05:00

26 lines
1.0 KiB
Plaintext

before try_compile with CMP0067 WARN-enabled but no variables
after try_compile with CMP0067 WARN-enabled but no variables
before try_compile with CMP0067 WARN-default
after try_compile with CMP0067 WARN-default
before try_compile with CMP0067 WARN-enabled
CMake Warning \(dev\) at CMP0067.cmake:[0-9]+ \(try_compile\):
Policy CMP0067 is not set: Honor language standard in try_compile\(\)
source-file signature. Run "cmake --help-policy CMP0067" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
For compatibility with older versions of CMake, try_compile is not honoring
language standard variables in the test project:
CMAKE_C_STANDARD
Call Stack \(most recent call first\):
CMakeLists.txt:[0-9]+ \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
after try_compile with CMP0067 WARN-enabled
before try_compile with CMP0067 OLD
after try_compile with CMP0067 OLD
before try_compile with CMP0067 NEW
after try_compile with CMP0067 NEW