Skip to content

[CMake] Change include path in HeaderDependencies.cpp #70597

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions SwiftCompilerSources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function(add_swift_compiler_module module)
get_property(modules GLOBAL PROPERTY swift_compiler_modules)
set_property(GLOBAL PROPERTY swift_compiler_modules ${modules} ${module})
endfunction()

# Add source files to a swift compiler module.
#
function(swift_compiler_sources module)
Expand Down Expand Up @@ -273,9 +273,9 @@ else()
"
#define COMPILED_WITH_SWIFT

#include \"Basic/BasicBridging.h\"
#include \"SIL/SILBridging.h\"
#include \"SILOptimizer/OptimizerBridging.h\"
#include \"swift/Basic/BasicBridging.h\"
#include \"swift/SIL/SILBridging.h\"
#include \"swift/SILOptimizer/OptimizerBridging.h\"
")
add_custom_command(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp"
Expand All @@ -287,9 +287,8 @@ else()

# step 2: build a library containing that source file. This library depends on all the included header files.
# The swift modules can now depend on that target.
# Note that this library is unused, i.e. not linked to anything.
# Note that this library is unused, i.e. not linked to anything.
add_library(importedHeaderDependencies "${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp")
target_include_directories(importedHeaderDependencies PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../include/swift")

# When building unified, we need to make sure all the Clang headers are
# generated before we try to use them.
Expand Down