https://github.com/Kitware/CMake
Revision ec08bc17526a7e22c1a18d5262ca0ca0c391ec6e authored by Brad King on 09 June 2022, 16:23:42 UTC, committed by Brad King on 10 June 2022, 13:12:43 UTC
Forward `CMAKE_<LANG>_FLAGS` and `CMAKE_<LANG>_FLAGS_DEBUG` from the
calling project into the test project.  The set of flags may affect the
availability of IPO support.  Since this may change the result of the
check for existing projects, add a policy for compatibility.

This was discovered after commit 5fcadc481e (MSVC: Default to -ZI
instead of /Zi for x86 and x64, 2022-05-24) introduced policy CMP0138 to
switch our default for MSVC's debug info flag.  The `-ZI` flag is
incompatible with the `-GL` flag used for IPO, so CMP0138 was reverted
pending future work on an alternative solution.  Re-use the CMP0138
policy number for this change to CheckIPOSupported instead.

Fixes: #23607
1 parent 7d73e88
History
Tip revision: ec08bc17526a7e22c1a18d5262ca0ca0c391ec6e authored by Brad King on 09 June 2022, 16:23:42 UTC
CheckIPOSupported: Compile check using flags of calling project
Tip revision: ec08bc1
File Mode Size
.github
.gitlab
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 1.4 KB
.clang-tidy -rw-r--r-- 1.3 KB
.codespellrc -rw-r--r-- 570 bytes
.editorconfig -rw-r--r-- 164 bytes
.gitattributes -rw-r--r-- 1.2 KB
.gitignore -rw-r--r-- 316 bytes
.gitlab-ci.yml -rw-r--r-- 27.7 KB
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.8 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 12.0 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 34.0 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 3.0 KB
CTestConfig.cmake -rw-r--r-- 566 bytes
CTestCustom.cmake.in -rw-r--r-- 6.8 KB
CompileFlags.cmake -rw-r--r-- 4.7 KB
Copyright.txt -rw-r--r-- 5.3 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.9 KB
bootstrap -rwxr-xr-x 63.2 KB
cmake_uninstall.cmake.in -rw-r--r-- 789 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top