summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-13 14:23:31 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-13 14:52:20 (GMT)
commit557b2d6e65038640d5016413e612e48691cff0d8 (patch)
treee78fffef3bf804f628eb7d2ec424e9354a59adb5 /Modules
parent017598a4443c19185dc245f3f0fcfceff9b98463 (diff)
downloadCMake-557b2d6e65038640d5016413e612e48691cff0d8.zip
CMake-557b2d6e65038640d5016413e612e48691cff0d8.tar.gz
CMake-557b2d6e65038640d5016413e612e48691cff0d8.tar.bz2
Fix regression in -I/usr/include exclusion logic
The change in commit 15ad830062 (Refactor exclusion of -I/usr/include to avoid per-language values, 2019-01-21, v3.14.0-rc1~108^2~4) caused the exclusion to apply to Fortran, but it was only meant for C, CXX, and CUDA. The purpose of the change was to prepare for the value of `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` to be computed from the actual compiler instead of hard-coded. We need to preserve exclusion of `-I/usr/include` if the compiler has any implicit include directory that looks intended to replace it, e.g. `<sdk>/usr/include` on macOS. Fixes: #18914
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/UnixPaths.cmake5
1 files changed, 0 insertions, 5 deletions
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 4ae4514..46c24bb 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -63,11 +63,6 @@ list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
/lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
)
-# Platform-wide directories to avoid adding via -I<dir>.
-list(APPEND CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES
- /usr/include
- )
-
# Default per-language values. These may be later replaced after
# parsing the implicit directory information from compiler output.
set(_CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES_INIT