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
  • #17066
Closed
Open
Issue created Jul 14, 2017 by Jacek Swierk@jswierk

Using clang in cross-compilation mode doesn't generate proper system include headers and macros for some IDEs

CodeBlocks and Eclipse generators (as well as the other IDEs that use them like QtCreator which uses CodeBlocks generator) have an additional module CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake that calls the compiler to find out system includes and defines. The problem is that the command that's called is incomplete for clang compilator that's run with arguments like --target, --gcc-toolchain or --sysroot. Moreover, if the CMAKE__COMPILER_ARG1 will include more than one argument the current module will not work correctly. Because of that, previously mentioned IDEs do not see certain system includes.

I prepared a quick patch that could be a base for official changes: CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.patch

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