https://github.com/Kitware/CMake
Revision 2d0b0e2b9d50aa14ccf345c727b2da73dfba9bd6 authored by Brad King on 29 May 2019, 14:40:09 UTC, committed by Brad King on 30 May 2019, 13:24:59 UTC
Entries of the `CPATH` environment variable are implicitly searched as
include directories by some C/C++ compilers.  Since commit 5990ecb741
(Compute implicit include directories from compiler output, 2018-12-07,
v3.14.0-rc1~108^2) these entries are detected by CMake and included in
the `CMAKE_{C,CXX}_IMPLICIT_INCLUDE_DIRECTORIES` variables.

However, we should not exclude them from explicit specification via `-I`
or particularly `-isystem` because they are meant as user-specified
include directories that can be re-ordered without breaking compiler
builtin headers.  In particular, we need explicit requests via
`include_directories` with the `SYSTEM` option to result in `-isystem`
so that third-party headers do not produce warnings.

Co-Author: Ben Boeckel <ben.boeckel@kitware.com>
Fixes: #19291
1 parent f872033
History
Tip revision: 2d0b0e2b9d50aa14ccf345c727b2da73dfba9bd6 authored by Brad King on 29 May 2019, 14:40:09 UTC
Do not exclude include directories made implicit by CPATH
Tip revision: 2d0b0e2
File Mode Size
.github
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 551 bytes
.clang-tidy -rw-r--r-- 1.0 KB
.gitattributes -rw-r--r-- 1.1 KB
.gitignore -rw-r--r-- 132 bytes
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.8 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 12.4 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 30.5 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 3.0 KB
CTestConfig.cmake -rw-r--r-- 440 bytes
CTestCustom.cmake.in -rw-r--r-- 6.5 KB
CompileFlags.cmake -rw-r--r-- 3.3 KB
Copyright.txt -rw-r--r-- 5.2 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.4 KB
bootstrap -rwxr-xr-x 48.9 KB
cmake_uninstall.cmake.in -rw-r--r-- 790 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top