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,105
    • Issues 4,105
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • 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
  • #16170
Closed
Open
Issue created Jun 27, 2016 by Ian Merin@ianm

Docs should mention that CMAKE_TOOLCHAIN_FILE does not have access to the cache

I am unsure if this is intended behavior.

When setting the CMAKE_SYSROOT variable in a Toolchain file, cache variables defined inside the Toolchain file are expanded in the --sysroots option passed to the compiler, but cache variables defined on the command line do not expand

Example:

In the Toolchain file: set(internal-dir xyz)

(set CMAKE_SYSROOT ${internal-dir}/${external-dir}/example) On the command line:

cmake -Dexternal-dir=abc -DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake

When trying to compile, --sysroot will be 'xyz//example', but the value of ${external-dir} is indeed set as abc confirmed by printing the value of ${external-dir}.

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