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 16
    • Merge requests 16
  • 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
  • #20573
Closed
Open
Issue created Apr 12, 2020 by Ghost User@ghostContributor

target_compile_definition documentation issue

Original discourse post: https://discourse.cmake.org/t/does-target-compile-definition-assign-a-value-to-the-item/987

Essentially I think the cmake documentation should mention there is no guarantee of a value being assigned to a compile definition.

Our project heavily relies on the use of the "#if" construct so it is important to know what cmake will/won't do.

Interestingly it hasn't been strictly necessary to specify since it's been passing our CI without issue so far. So we have been relying on undefined behavior (scary).

Our current testing primarily uses:

  • GCC, Unix Makefiles
  • MSVC, Ninja
Edited Apr 12, 2020 by Ghost User
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking