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,102
    • Issues 4,102
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • 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
  • #17842
Closed
Open
Issue created Mar 21, 2018 by Brad King@brad.kingOwner

Deprecate WriteCompilerDetectionHeader

WriteCompilerDetectionHeader is an attempt to provide a C++ compatibility layer by re-using information from CMake's table of preprocessor checks for compile features. However, it is essentially providing a header file with CMake. This means that the available knowledge in a WCDH-generated header is limited by the version of CMake running. Projects that want newer features then need to artificially require a newer minimum version of CMake than they otherwise might need to.

I've seen at least one project work around this problem by having a developer locally run WCDH once and then copying the generated header into their source tree. That way the project can have all the information from the version of CMake that the developer used locally even if the project is built by a user running an older CMake.

IMO the header generated by WCDH would be better provided as an externally-maintained header-only library project that can be versioned and distributed independently of CMake. Therefore I propose deprecating the WCDH module and perhaps adding a policy to disallow its use. Ideally we'd be able to recommend a good alternative in the deprecation messages. This may require preparing the externally-maintained package first.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking