summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/export/NamelinkOnlyExport.cmake9
-rw-r--r--Tests/RunCMake/export/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/export/UnknownExport-result.txt1
-rw-r--r--Tests/RunCMake/export/UnknownExport-stderr.txt4
-rw-r--r--Tests/RunCMake/export/UnknownExport.cmake2
-rw-r--r--Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake12
-rw-r--r--Tests/RunCMake/install/EXPORT-UnknownExport-result.txt1
-rw-r--r--Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt1
-rw-r--r--Tests/RunCMake/install/EXPORT-UnknownExport.cmake5
-rw-r--r--Tests/RunCMake/install/RunCMakeTest.cmake2
10 files changed, 39 insertions, 0 deletions
diff --git a/Tests/RunCMake/export/NamelinkOnlyExport.cmake b/Tests/RunCMake/export/NamelinkOnlyExport.cmake
new file mode 100644
index 0000000..4bdd180
--- /dev/null
+++ b/Tests/RunCMake/export/NamelinkOnlyExport.cmake
@@ -0,0 +1,9 @@
+enable_language(CXX)
+add_library(foo SHARED empty.cpp)
+install(TARGETS foo EXPORT fooExport
+ RUNTIME DESTINATION bin
+ LIBRARY
+ DESTINATION lib
+ NAMELINK_ONLY
+)
+export(EXPORT fooExport FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
diff --git a/Tests/RunCMake/export/RunCMakeTest.cmake b/Tests/RunCMake/export/RunCMakeTest.cmake
index 1c74762..95c8d5c 100644
--- a/Tests/RunCMake/export/RunCMakeTest.cmake
+++ b/Tests/RunCMake/export/RunCMakeTest.cmake
@@ -15,3 +15,5 @@ run_cmake(ForbiddenToExportPropertyWithGenExp)
run_cmake(ExportPropertiesUndefined)
run_cmake(DependOnNotExport)
run_cmake(DependOnDoubleExport)
+run_cmake(UnknownExport)
+run_cmake(NamelinkOnlyExport)
diff --git a/Tests/RunCMake/export/UnknownExport-result.txt b/Tests/RunCMake/export/UnknownExport-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/export/UnknownExport-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/export/UnknownExport-stderr.txt b/Tests/RunCMake/export/UnknownExport-stderr.txt
new file mode 100644
index 0000000..a8f8453
--- /dev/null
+++ b/Tests/RunCMake/export/UnknownExport-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UnknownExport\.cmake:[0-9]+ \(export\):
+ export Export set "fooExport" not found\.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/export/UnknownExport.cmake b/Tests/RunCMake/export/UnknownExport.cmake
new file mode 100644
index 0000000..bf82d1f
--- /dev/null
+++ b/Tests/RunCMake/export/UnknownExport.cmake
@@ -0,0 +1,2 @@
+enable_language(CXX)
+export(EXPORT fooExport FILE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake")
diff --git a/Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake b/Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake
new file mode 100644
index 0000000..1c310d1
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-NamelinkOnly.cmake
@@ -0,0 +1,12 @@
+enable_language(C)
+add_library(foo SHARED empty.c)
+install(TARGETS foo EXPORT fooExport
+ RUNTIME DESTINATION bin
+ LIBRARY
+ DESTINATION lib
+ NAMELINK_ONLY
+)
+install(EXPORT fooExport
+ DESTINATION "lib/cmake/"
+ FILE "foo.cmake"
+)
diff --git a/Tests/RunCMake/install/EXPORT-UnknownExport-result.txt b/Tests/RunCMake/install/EXPORT-UnknownExport-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-UnknownExport-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt b/Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt
new file mode 100644
index 0000000..bd49fa2
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-UnknownExport-stderr.txt
@@ -0,0 +1 @@
+CMake Error: INSTALL\(EXPORT\) given unknown export "fooExport"
diff --git a/Tests/RunCMake/install/EXPORT-UnknownExport.cmake b/Tests/RunCMake/install/EXPORT-UnknownExport.cmake
new file mode 100644
index 0000000..2dbba4e
--- /dev/null
+++ b/Tests/RunCMake/install/EXPORT-UnknownExport.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+install(EXPORT fooExport
+ DESTINATION "lib/cmake/"
+ FILE "foo.cmake"
+)
diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake
index 3573fbd..5aab88c 100644
--- a/Tests/RunCMake/install/RunCMakeTest.cmake
+++ b/Tests/RunCMake/install/RunCMakeTest.cmake
@@ -76,6 +76,8 @@ run_cmake(DIRECTORY-DESTINATION-bad)
run_cmake(FILES-DESTINATION-bad)
run_cmake(TARGETS-DESTINATION-bad)
run_cmake(EXPORT-OldIFace)
+run_cmake(EXPORT-UnknownExport)
+run_cmake(EXPORT-NamelinkOnly)
run_cmake(CMP0062-OLD)
run_cmake(CMP0062-NEW)
run_cmake(CMP0062-WARN)