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,104
    • Issues 4,104
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • 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
  • #17483
Closed
Open
Issue created Nov 17, 2017 by Ray Donnelly@mingwandroid

Should CMake automatically determine CMAKE_SYSROOT when using a (cross-)compiler that can provide this information?

A gcc cross-compiler can be asked for its sysroot via --print-sysroot. I found myself needing to create a toolchain file just to set this value but it seems like something that CMake could/should do automatically.

If a merge-request for this was acceptable then I'll be happy to have a go. Any pointers so I do not start off on the wrong path would be appreciated too as I am definitely not clear on a few of the technical aspects, for example, should such a sysroot be excluded from CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES and/or CMAKE_EXTRA_GENERATOR_<LANG>_SYSTEM_INCLUDE_DIRS?

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