Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4,163
    • Issues 4,163
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • 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
  • Issues
  • #23200
Closed
Open
Issue created Feb 09, 2022 by alcroito@alcroitoDeveloper

try_compile: Provide central logging for all try_compile calls

Initially inquired here https://discourse.cmake.org/t/central-logging-of-all-source-and-project-based-try-compile-calls-into-a-file/1720

It would be useful to provide central logging of all 'try_compile-like' calls that would include:

  • exact cmake arguments used during their configuration
  • output of the cmake configuration
  • verbose stdout and stderr output of building the projects

This would include both source-based and project-based try_compile calls.

I mention 'try-compile-like' because it would be great if it also included the output of the initial language detection that CMake does at the beginning of each project.

Use case: When configuring a complex project, some try_compile calls might fail. Troubleshooting them can be complicated, especially if you're a new CMake user. Having a central location can make that considerably easier.

As mentioned in the initial link, the current implementation of CMakeFiles/CMakeError.log and CMakeFiles/CMakeOutput.log are not sufficient.

A bit of brainstorming, potential forms the the logging could take:

  • one single file CMakeTryCompileLog.txt
  • multiple files CMakeTryCompileCallsLog.txt for the cmake commands, CMakeTryCompileConfigureLog.txt for the configure output, CMakeTryCompileBuildLog.txt for the stdout/stderr of the build.
  • something in-between
Edited Oct 11, 2022 by Matthew Woehlke
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking