Skip to content
Snippets Groups Projects
Commit 3ddd7f35 authored by Brad King's avatar Brad King
Browse files

enable_language: Fix test for working compiler with CMP0126 NEW behavior

Update the logic that converts a `try_compile` result from a cache
entry to a normal variable to tolerate an existing normal variable
under CMP0126 NEW behavior.  Otherwise the `try_compile` result
is ignored because CMake uses the false value of the normal variable,
and CMake incorrectly reports that the compiler does not work.

This went unnoticed for some languages (e.g. C and CXX) because the
check for a working compiler is skipped if ABI detection works.
It does affect other languages (e.g. CSharp).

Fixes: #22423
parent 7c6234dd
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment