mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
Swift: Exclude SDK include paths
Populate `CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES` with the macOS SDK's include directory so that we filter such implicit directories out of Swift targets. Fixes: #19845
This commit is contained in:
committed by
Brad King
parent
155540d89e
commit
5c2a92f44f
@@ -50,6 +50,11 @@ else()
|
||||
"the following output:\n${__CMAKE_Swift_COMPILER_OUTPUT}\n\n")
|
||||
endif()
|
||||
|
||||
# Unlike C and CXX we do not yet detect any information about the Swift ABI.
|
||||
# However, one of the steps done for C and CXX as part of that detection is
|
||||
# to initialize the implicit include directories. That is relevant here.
|
||||
set(CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES "${_CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES_INIT}")
|
||||
|
||||
# Re-configure to save learned information.
|
||||
configure_file(${CMAKE_ROOT}/Modules/CMakeSwiftCompiler.cmake.in
|
||||
${CMAKE_PLATFORM_INFO_DIR}/CMakeSwiftCompiler.cmake @ONLY)
|
||||
|
||||
Reference in New Issue
Block a user