summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-10 16:24:54 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-02-10 16:24:54 (GMT)
commit6e149e1591249d4666b4f7eefd58f414c4b5d973 (patch)
tree674b8a4ad41cf8a917cc06dbc713643a356b2ab0 /Tests
parente180c1def031ae22c4843c308d6d3710ebcb18e2 (diff)
parent6d85a6a64c6919c07d983b584bb74f6a29cddac5 (diff)
downloadCMake-6e149e1591249d4666b4f7eefd58f414c4b5d973.zip
CMake-6e149e1591249d4666b4f7eefd58f414c4b5d973.tar.gz
CMake-6e149e1591249d4666b4f7eefd58f414c4b5d973.tar.bz2
Merge topic 'interface-library-signatures'
6d85a6a6 add_library: Issue better diagnostic for INTERFACE GLOBAL signature. 770245e9 add_library: Test invalid GLOBAL INTERFACE signature.
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-stderr.txt2
-rw-r--r--Tests/RunCMake/interface_library/invalid_signature.cmake2
6 files changed, 15 insertions, 2 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-stderr.txt b/Tests/RunCMake/interface_library/invalid_signature-stderr.txt
index 701586a..6374b33 100644
--- a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt
+++ b/Tests/RunCMake/interface_library/invalid_signature-stderr.txt
@@ -84,6 +84,6 @@ Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
+
CMake Error at invalid_signature.cmake:20 \(add_library\):
- add_library INTERFACE library requires no source arguments.
+ add_library GLOBAL option may only be used with IMPORTED libraries.
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
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)