Skip to content

Commit 7ae2ea2

Browse files
authored
Merge pull request #3434 from gottesmm/create_add_swift_subdirectory
2 parents 23987b2 + 224d763 commit 7ae2ea2

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,3 +1763,11 @@ function(add_swift_executable name)
17631763
${SWIFTEXE_DONT_STRIP_NON_MAIN_SYMBOLS_FLAG}
17641764
${SWIFTEXE_DISABLE_ASLR_FLAG})
17651765
endfunction()
1766+
1767+
macro(add_swift_tool_subdirectory name)
1768+
add_llvm_subdirectory(SWIFT TOOL ${name})
1769+
endmacro()
1770+
1771+
macro(add_swift_lib_subdirectory name)
1772+
add_llvm_subdirectory(SWIFT LIB ${name})
1773+
endmacro()

tools/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
add_subdirectory(driver)
2-
add_subdirectory(sil-opt)
3-
add_subdirectory(swift-ide-test)
4-
add_subdirectory(swift-remoteast-test)
5-
add_subdirectory(swift-demangle)
6-
add_subdirectory(lldb-moduleimport-test)
7-
add_subdirectory(sil-extract)
8-
add_subdirectory(swift-llvm-opt)
1+
add_swift_tool_subdirectory(driver)
2+
add_swift_tool_subdirectory(sil-opt)
3+
add_swift_tool_subdirectory(swift-ide-test)
4+
add_swift_tool_subdirectory(swift-remoteast-test)
5+
add_swift_tool_subdirectory(swift-demangle)
6+
add_swift_tool_subdirectory(lldb-moduleimport-test)
7+
add_swift_tool_subdirectory(sil-extract)
8+
add_swift_tool_subdirectory(swift-llvm-opt)
99

1010
if(SWIFT_BUILD_SOURCEKIT)
11-
add_subdirectory(SourceKit)
11+
add_swift_tool_subdirectory(SourceKit)
1212
endif()

tools/SourceKit/tools/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include_directories(
44
${SOURCEKITD_SOURCE_DIR}/include
55
)
66

7-
add_subdirectory(sourcekitd)
8-
add_subdirectory(sourcekitd-test)
9-
add_subdirectory(sourcekitd-repl)
10-
add_subdirectory(complete-test)
7+
add_swift_lib_subdirectory(sourcekitd)
8+
add_swift_tool_subdirectory(sourcekitd-test)
9+
add_swift_tool_subdirectory(sourcekitd-repl)
10+
add_swift_tool_subdirectory(complete-test)

0 commit comments

Comments
 (0)