summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 04db70b..6ca08d0 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -343,6 +343,11 @@ if(BUILD_TESTING)
endif()
endif()
endif()
+ if(NOT DEFINED CMake_TEST_Swift)
+ if(CMAKE_Swift_COMPILER OR CMake_TEST_XCODE_SWIFT)
+ set(CMake_TEST_Swift 1)
+ endif()
+ endif()
# Use 1500 or CTEST_TEST_TIMEOUT for long test timeout value,
# whichever is greater.
@@ -390,7 +395,7 @@ if(BUILD_TESTING)
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
set_tests_properties(MissingSourceFile PROPERTIES
PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
- if(CMAKE_Swift_COMPILER OR CMake_TEST_XCODE_SWIFT)
+ if(CMake_TEST_Swift)
ADD_TEST_MACRO(SwiftOnly SwiftOnly)
if(CMake_TEST_XCODE_SWIFT)
ADD_TEST_MACRO(SwiftMix SwiftMix)