Skip to content

Commit b62c1dc

Browse files
authored
Merge pull request #39130 from gottesmm/pr-1e3292b006649eb175a2cc6f5adc10705fe20425
[cmake] Allow for users to build binaries for testing even if we aren't going to run the actual tests.
2 parents ec05b02 + 872d492 commit b62c1dc

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ option(SWIFT_BUILD_PERF_TESTSUITE
127127

128128
option(SWIFT_INCLUDE_TESTS "Create targets for building/running tests." TRUE)
129129

130+
option(SWIFT_INCLUDE_TEST_BINARIES
131+
"Create targets for building/running test binaries even if SWIFT_INCLUDE_TESTS is disabled"
132+
TRUE)
133+
130134
option(SWIFT_INCLUDE_DOCS
131135
"Create targets for building docs."
132136
TRUE)

stdlib/tools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Keep in sync with test/CMakeLists.txt: swift-reflection-test is
22
# only used when testing dynamic stdlib.
3-
if(SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_INCLUDE_TESTS)
3+
if(SWIFT_BUILD_DYNAMIC_STDLIB AND (SWIFT_INCLUDE_TESTS OR SWIFT_INCLUDE_TEST_BINARIES))
44
add_subdirectory(swift-reflection-test)
55
endif()

tools/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ add_swift_tool_subdirectory(swift-refactor)
3030
add_swift_tool_subdirectory(libSwiftScan)
3131
if(SWIFT_BUILD_SYNTAXPARSERLIB)
3232
add_swift_tool_subdirectory(libSwiftSyntaxParser)
33-
if(SWIFT_INCLUDE_TESTS OR SWIFT_BUILD_SYNTAXPARSERTEST)
33+
if(SWIFT_INCLUDE_TESTS OR SWIFT_BUILD_SYNTAXPARSERTEST OR SWIFT_INCLUDE_TEST_BINARIES)
3434
add_swift_tool_subdirectory(swift-syntax-parser-test)
3535
endif()
3636
endif()
3737

38-
if(SWIFT_INCLUDE_TESTS)
38+
if(SWIFT_INCLUDE_TESTS OR SWIFT_INCLUDE_TEST_BINARIES)
3939
add_swift_tool_subdirectory(swift-ide-test)
4040
add_swift_tool_subdirectory(swift-remoteast-test)
4141
add_swift_tool_subdirectory(lldb-moduleimport-test)

tools/SourceKit/tools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ add_swift_lib_subdirectory(sourcekitd)
88
if(LibEdit_FOUND AND LibEdit_HAS_UNICODE)
99
add_swift_tool_subdirectory(sourcekitd-repl)
1010
endif()
11-
if(SWIFT_INCLUDE_TESTS)
11+
if(SWIFT_INCLUDE_TESTS OR SWIFT_INCLUDE_TEST_BINARIES)
1212
add_swift_tool_subdirectory(sourcekitd-test)
1313
add_swift_tool_subdirectory(complete-test)
1414
endif()

0 commit comments

Comments
 (0)