Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4,100
    • Issues 4,100
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Merge requests
  • !4789

enable_language: Assume compiler works if ABI detection compiles

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Brad King requested to merge brad.king/cmake:reduce-initial-checks into master May 25, 2020
  • Overview 19
  • Commits 2
  • Pipelines 1
  • Changes 7

We run a try_compile with a tiny test source to check if the compiler works so that we can fail early if it does not. When the compiler does work, we immediately try_compile the ABI detection source. In the common case that both steps work, we gain no useful information from the first one and the work was wasted.

Re-order the checks to try the ABI detection first. If it works then assume the compiler works and skip the dedicated check. If the ABI check fails then proceed with the normal test for a working compiler so the diagnostic can be shown as before.

Fixes: #18703 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: reduce-initial-checks