Files
Brad King 39cc425791 try_compile: Restore toleration of toolchain file setting internal variable
Prior to commit 243462fafe (try_compile: Tolerate compile features from
non-enabled languages, 2026-05-18, v4.4.0-rc1~84^2) we accidentally
tolerated toolchain files setting `CMAKE_<LANG>_COMPILER_LOADED`.
Meson accidentally relied on this, so restore toleration of it.

Fixes: #27971
2026-07-20 14:52:47 -04:00

6 lines
200 B
CMake

enable_language(C)
try_compile(SHOULD_PASS SOURCE_FROM_CONTENT "main.c" "int main(void) { return 0; }")
if(NOT SHOULD_PASS)
message(FATAL_ERROR "try_compile failed but should have passed!")
endif()