Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4,165
    • Issues 4,165
    • 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
  • #17059
Closed
Open
Issue created Jul 12, 2017 by Brad King@brad.kingOwner

Android: Passing sysroot /usr/include to include_directories breaks ordering

When cross-compiling to Android, the code

include_directories(${CMAKE_SYSROOT_COMPILE}/usr/include)

causes the -isystem /path/to/sysroot/usr/include argument that CMake adds to move too early in the command line. This directory is listed in CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES and therefore should be added only at the end of the command line. It should be filtered out of user-specified directories because it is an implicit include directory.

This was discovered by discussion in Android NDK issue 452.

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