mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 12:16:40 +08:00
macOS: Fix addition of <sdk>/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 `<sdk>/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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user