summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-02-07 14:38:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-02-07 14:49:15 (GMT)
commit770245e9287de01c990605b54d28302c9cac3340 (patch)
tree6cae091e719e93975a2b2a1b62765206be239b07 /Tests
parent53cffda228e50948e52ae3b5bc46d4fa3f59a0ba (diff)
downloadCMake-770245e9287de01c990605b54d28302c9cac3340.zip
CMake-770245e9287de01c990605b54d28302c9cac3340.tar.gz
CMake-770245e9287de01c990605b54d28302c9cac3340.tar.bz2
add_library: Test invalid GLOBAL INTERFACE signature.
This has to be tested separately from the invalid_signature test because target sources are evaluate at a later time, and earlier errors in the invalid_signature test cause early exit.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/interface_library/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/interface_library/global-interface-result.txt1
-rw-r--r--Tests/RunCMake/interface_library/global-interface-stderr.txt9
-rw-r--r--Tests/RunCMake/interface_library/global-interface.cmake2
-rw-r--r--Tests/RunCMake/interface_library/invalid_signature.cmake2
5 files changed, 14 insertions, 1 deletions
diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
index 9ca9a77..3c457c5 100644
--- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake
+++ b/Tests/RunCMake/interface_library/RunCMakeTest.cmake
@@ -5,5 +5,6 @@ run_cmake(target_commands)
run_cmake(no_shared_libs)
run_cmake(whitelist)
run_cmake(invalid_signature)
+run_cmake(global-interface)
run_cmake(genex_link)
run_cmake(add_dependencies)
diff --git a/Tests/RunCMake/interface_library/global-interface-result.txt b/Tests/RunCMake/interface_library/global-interface-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/interface_library/global-interface-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/interface_library/global-interface-stderr.txt
new file mode 100644
index 0000000..24edd0f
--- /dev/null
+++ b/Tests/RunCMake/interface_library/global-interface-stderr.txt
@@ -0,0 +1,9 @@
+CMake Error at global-interface.cmake:2 \(add_library\):
+ Cannot find source file:
+
+ GLOBAL
+
+ Tried extensions \.c \.C \.c\+\+ \.cc \.cpp \.cxx \.m \.M \.mm \.h \.hh \.h\+\+ \.hm \.hpp
+ \.hxx \.in \.txx
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/interface_library/global-interface.cmake b/Tests/RunCMake/interface_library/global-interface.cmake
new file mode 100644
index 0000000..d2bfc64
--- /dev/null
+++ b/Tests/RunCMake/interface_library/global-interface.cmake
@@ -0,0 +1,2 @@
+
+add_library(iface GLOBAL INTERFACE)
diff --git a/Tests/RunCMake/interface_library/invalid_signature.cmake b/Tests/RunCMake/interface_library/invalid_signature.cmake
index 67e3267..4e53534 100644
--- a/Tests/RunCMake/interface_library/invalid_signature.cmake
+++ b/Tests/RunCMake/interface_library/invalid_signature.cmake
@@ -16,5 +16,5 @@ add_library(iface15 ALIAS INTERFACE)
add_library(iface16 INTERFACE INTERFACE)
add_library(iface17 INTERFACE EXCLUDE_FROM_ALL)
add_library(iface18 EXCLUDE_FROM_ALL INTERFACE)
-add_library(iface19 GLOBAL INTERFACE)
+# add_library(iface19 GLOBAL INTERFACE) Tested separately
add_library(iface20 INTERFACE GLOBAL)