Files
Brad King 5e52f92a2a try_compile: Add support for toolchain files to query CMP0181
Follow the approach from commit 92320466dd (try_compile: Restore
platform-default link flags in pre-CMP0210 projects, 2026-08-22)
to make the CMP0181 policy setting available in `try_compile`
projects before the toolchain file is loaded.

Fixes: #28108
2026-09-22 11:35:05 -04:00

6 lines
153 B
CMake

get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
if(_IN_TC)
cmake_policy(GET CMP0181 cmp0181)
message("try_compile CMP0181='${cmp0181}'")
endif()