Skip to content

Commit f10e66e

Browse files
authored
Merge pull request #60361 from ahoppen/pr/more-relative-cmake-paths
[CMake] Use CMAKE_CURRENT_SOURCE_DIR as base for includes in SwiftCompilerSources
2 parents 09dcbde + c096c7e commit f10e66e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SwiftCompilerSources/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,16 @@ else()
237237
COMMAND
238238
"sed"
239239
-n -e "/header/!d" -e "s/.*header/#include/" -e "w ${CMAKE_CURRENT_BINARY_DIR}/HeaderDependencies.cpp"
240-
"${CMAKE_SOURCE_DIR}/include/swift/module.modulemap"
241-
DEPENDS "${CMAKE_SOURCE_DIR}/include/swift/module.modulemap"
240+
"${CMAKE_CURRENT_SOURCE_DIR}/../include/swift/module.modulemap"
241+
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../include/swift/module.modulemap"
242242
COMMENT "Generate HeaderDependencies.cpp"
243243
)
244244

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

251251
if(${BOOTSTRAPPING_MODE} MATCHES "HOSTTOOLS|CROSSCOMPILE")
252252

0 commit comments

Comments
 (0)