summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-20 14:55:11 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-20 14:55:27 (GMT)
commita9fb9a8774a7b1dd411542d1d14fb537968e32f1 (patch)
tree2d74dc351b298a5317d05634170c91a8b43bc07e /Tests/CMakeLists.txt
parent28ee31149030c75c32ebbf134502a9d020dbd54b (diff)
parenta9180ccf9a9e845658ba455e2dbc2447b18d2654 (diff)
downloadCMake-a9fb9a8774a7b1dd411542d1d14fb537968e32f1.zip
CMake-a9fb9a8774a7b1dd411542d1d14fb537968e32f1.tar.gz
CMake-a9fb9a8774a7b1dd411542d1d14fb537968e32f1.tar.bz2
Merge topic 'ninja-swift'
a9180ccf9a Tests: add a check for the Swift compiler d745551fb6 Help: add some initial documentation for Swift support 9a182c9e5b Auxiliary: update vim syntax highlighting e9b0063e8e Modules: add build rules for Swift Ninja support b6412e3e38 Ninja: add placeholders to support Swift build 7d7f31161d Ninja: add support for Swift's output-file-map.json d688c4c19d Swift: remove unnecessary unreleased Ninja infrastructure 0723582208 Swift: Detect compiler version ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3297
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 852b00f..698cb1d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -22,6 +22,7 @@ macro(ADD_TEST_MACRO NAME)
endmacro()
include(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/CheckSwift.cmake)
# Fake a user home directory to avoid polluting the real one.
if(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
@@ -365,11 +366,16 @@ if(BUILD_TESTING)
((NOT CMAKE_OSX_SDKPRODUCT STREQUAL "Mac OS X") OR
(NOT CMAKE_OSX_SDKVERSION VERSION_LESS 10.10)))
if(CMAKE_GENERATOR STREQUAL "Xcode")
- ADD_TEST_MACRO(SwiftMix SwiftMix)
- ADD_TEST_MACRO(SwiftOnly SwiftOnly)
+ set(CMake_TEST_XCODE_SWIFT 1)
endif()
endif()
endif()
+ if(CMAKE_Swift_COMPILER OR CMake_TEST_XCODE_SWIFT)
+ ADD_TEST_MACRO(SwiftOnly SwiftOnly)
+ if(CMake_TEST_XCODE_SWIFT)
+ ADD_TEST_MACRO(SwiftMix SwiftMix)
+ endif()
+ endif()
if(CMAKE_Fortran_COMPILER)
ADD_TEST_MACRO(FortranOnly FortranOnly)
endif()