summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install
diff options
context:
space:
mode:
authorDeniz Bahadir <dbahadir@benocs.com>2020-10-09 10:13:13 (GMT)
committerDeniz Bahadir <dbahadir@benocs.com>2020-10-09 20:29:22 (GMT)
commit64690f6df043b65b083c258b2c53910508336469 (patch)
tree4200ba898a14d89aaf2950364f47cfce33cdb785 /Tests/RunCMake/install
parent3fb2112880ca3be6299721f5add1928483de0b1b (diff)
downloadCMake-64690f6df043b65b083c258b2c53910508336469.zip
CMake-64690f6df043b65b083c258b2c53910508336469.tar.gz
CMake-64690f6df043b65b083c258b2c53910508336469.tar.bz2
export: Do not fail generation for namelink-only case
Diffstat (limited to 'Tests/RunCMake/install')
-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
5 files changed, 21 insertions, 0 deletions
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)