Skip to content
Snippets Groups Projects

enable_language: Fix test for working compiler with CMP0126 NEW behavior

Merged Brad King requested to merge brad.king/cmake:enable_language-CMP0126 into master
All threads resolved!

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 (closed)
Backport: release

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Brad King resolved all threads

    resolved all threads

  • Do: merge

  • merged

  • Brad King mentioned in commit 095f49ec

    mentioned in commit 095f49ec

  • Brad King mentioned in commit 8802d8f8

    mentioned in commit 8802d8f8

  • mentioned in issue #22451 (closed)

  • Brad King mentioned in merge request !6375 (merged)

    mentioned in merge request !6375 (merged)

  • Brad King
  • Brad King resolved all threads

    resolved all threads

  • Please register or sign in to reply
    Loading