mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
The CMP0210 compatibility shims in the Darwin, AIX, HP-UX and ARMClang modules read the policy with cmake_policy(GET CMP0210 ...) during enable_language(), which runs inside project(). cmCoreTryCompile emitted cmake_policy(SET CMP0210 ...) after project() in the generated test project, so those shims always observed NEW regardless of the calling project's setting. On affected platforms this dropped the platform default link flags from every try_compile, and left a toolchain-file value of CMAKE_<LANG>_LINK_FLAGS unclobbered so that it reached the OLD code path. For projects that are also not using CMP0181 NEW, that path uses the variable as is and does not expand the LINKER: prefix. Move the emission into the existing pre-project() policy block alongside CMP0126, CMP0128 and CMP0197, which exist for exactly this reason. Fixes: #28102
3 lines
49 B
CMake
3 lines
49 B
CMake
cmake_policy(SET CMP0210 NEW)
|
|
enable_language(C)
|