mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
f72ba42b7c
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
26 lines
1.0 KiB
Plaintext
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
|