summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-04 12:33:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-04 12:34:21 (GMT)
commit65f5df7d08f2c96d551f578ec509271888ecb7be (patch)
treef510f31963ce9b23b0aeaa5545f7355450131159 /Tests
parent9ba901eb3c6579baaf2fec9996e0cbf7b5514fa7 (diff)
parentb06f4c8a745c96f19a9e9a7c7eb0ac22250472a2 (diff)
downloadCMake-65f5df7d08f2c96d551f578ec509271888ecb7be.zip
CMake-65f5df7d08f2c96d551f578ec509271888ecb7be.tar.gz
CMake-65f5df7d08f2c96d551f578ec509271888ecb7be.tar.bz2
Merge topic 'executables-are-consoled'
b06f4c8a74 Swift: disallow WIN32_EXECUTABLE properties Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3410
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/Swift/E.swift2
-rw-r--r--Tests/RunCMake/Swift/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/Swift/Win32ExecutableDisallowed-result.txt1
-rw-r--r--Tests/RunCMake/Swift/Win32ExecutableDisallowed-stderr.txt4
-rw-r--r--Tests/RunCMake/Swift/Win32ExecutableDisallowed.cmake4
5 files changed, 12 insertions, 1 deletions
diff --git a/Tests/RunCMake/Swift/E.swift b/Tests/RunCMake/Swift/E.swift
new file mode 100644
index 0000000..a415467
--- /dev/null
+++ b/Tests/RunCMake/Swift/E.swift
@@ -0,0 +1,2 @@
+func f() {
+}
diff --git a/Tests/RunCMake/Swift/RunCMakeTest.cmake b/Tests/RunCMake/Swift/RunCMakeTest.cmake
index de99042..4817045 100644
--- a/Tests/RunCMake/Swift/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Swift/RunCMakeTest.cmake
@@ -6,7 +6,7 @@ if(RunCMake_GENERATOR STREQUAL Xcode)
endif()
elseif(RunCMake_GENERATOR STREQUAL Ninja)
if(CMAKE_Swift_COMPILER)
- # Add Ninja-specific Swift tests here.
+ run_cmake(Win32ExecutableDisallowed)
endif()
else()
run_cmake(NotSupported)
diff --git a/Tests/RunCMake/Swift/Win32ExecutableDisallowed-result.txt b/Tests/RunCMake/Swift/Win32ExecutableDisallowed-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/Swift/Win32ExecutableDisallowed-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/Swift/Win32ExecutableDisallowed-stderr.txt b/Tests/RunCMake/Swift/Win32ExecutableDisallowed-stderr.txt
new file mode 100644
index 0000000..d78101a
--- /dev/null
+++ b/Tests/RunCMake/Swift/Win32ExecutableDisallowed-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at Win32ExecutableDisallowed.cmake:[0-9]+ \(add_executable\):
+ WIN32_EXECUTABLE property is not supported on Swift executables
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/Swift/Win32ExecutableDisallowed.cmake b/Tests/RunCMake/Swift/Win32ExecutableDisallowed.cmake
new file mode 100644
index 0000000..02d5447
--- /dev/null
+++ b/Tests/RunCMake/Swift/Win32ExecutableDisallowed.cmake
@@ -0,0 +1,4 @@
+enable_language(Swift)
+add_executable(E E.swift)
+set_target_properties(E PROPERTIES
+ WIN32_EXECUTABLE TRUE)