summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Swift
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2020-03-07 18:15:29 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-03-09 13:11:22 (GMT)
commit65b3848de0ae6251858dd12c97bff8110cb845f1 (patch)
tree43a7c665fd2fb3345673f8004fd80fd67ce7cade /Tests/RunCMake/Swift
parent6857aaaa062f3526fc54438472fe676bcda5842e (diff)
downloadCMake-65b3848de0ae6251858dd12c97bff8110cb845f1.zip
CMake-65b3848de0ae6251858dd12c97bff8110cb845f1.tar.gz
CMake-65b3848de0ae6251858dd12c97bff8110cb845f1.tar.bz2
Swift: support Ninja Multi-Config
Enable support for multi-configuration builds using Ninja when building Swift.
Diffstat (limited to 'Tests/RunCMake/Swift')
-rw-r--r--Tests/RunCMake/Swift/L.swift1
-rw-r--r--Tests/RunCMake/Swift/RunCMakeTest.cmake6
-rw-r--r--Tests/RunCMake/Swift/SwiftSimple.cmake2
3 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/Swift/L.swift b/Tests/RunCMake/Swift/L.swift
new file mode 100644
index 0000000..79ff87e
--- /dev/null
+++ b/Tests/RunCMake/Swift/L.swift
@@ -0,0 +1 @@
+public let ThirtyTwo: Int = 32
diff --git a/Tests/RunCMake/Swift/RunCMakeTest.cmake b/Tests/RunCMake/Swift/RunCMakeTest.cmake
index 918df0b..1db202e 100644
--- a/Tests/RunCMake/Swift/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Swift/RunCMakeTest.cmake
@@ -12,6 +12,12 @@ elseif(RunCMake_GENERATOR STREQUAL Ninja)
run_cmake(SwiftMultiArch)
unset(RunCMake_TEST_OPTIONS)
endif()
+elseif(RunCMake_GENERATOR STREQUAL "Ninja Multi-Config")
+ if(CMAKE_Swift_COMPILER)
+ set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release")
+ run_cmake(SwiftSimple)
+ unset(RunCMake_TEST_OPTIONS)
+ endif()
else()
run_cmake(NotSupported)
endif()
diff --git a/Tests/RunCMake/Swift/SwiftSimple.cmake b/Tests/RunCMake/Swift/SwiftSimple.cmake
new file mode 100644
index 0000000..1f2702d
--- /dev/null
+++ b/Tests/RunCMake/Swift/SwiftSimple.cmake
@@ -0,0 +1,2 @@
+enable_language(Swift)
+add_library(L L.swift)