From 017598a4443c19185dc245f3f0fcfceff9b98463 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 13 Feb 2019 09:45:36 -0500 Subject: macOS: Fix addition of /usr/include to default implicit include dirs In commit 1293ed8507 (ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmake, 2019-01-30, v3.14.0-rc1~26^2) the `Platform/UnixPaths` module was updated to add `/usr/include` to `CMAKE_{C,CXX,CUDA}_IMPLICIT_INCLUDE_DIRECTORIES` through an initialization variable used by `CMakeDetermineCompilerABI` instead of directly. This approach makes it only a default that can be overridden by detection of the implicit include directories really used by the compiler. The addition of `/usr/include` to default implicit include directories by the `Platform/Darwin` module needs the same update but was accidentally left out of the original commit. --- Modules/Platform/Darwin.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake index a73ffba..5590433 100644 --- a/Modules/Platform/Darwin.cmake +++ b/Modules/Platform/Darwin.cmake @@ -214,7 +214,7 @@ include(Platform/UnixPaths) if(_CMAKE_OSX_SYSROOT_PATH AND EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) list(APPEND CMAKE_SYSTEM_PREFIX_PATH ${_CMAKE_OSX_SYSROOT_PATH}/usr) foreach(lang C CXX) - list(APPEND CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) + list(APPEND _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT ${_CMAKE_OSX_SYSROOT_PATH}/usr/include) endforeach() endif() list(APPEND CMAKE_SYSTEM_PREFIX_PATH -- cgit v0.12