summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-09-03 13:29:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-09-03 13:30:15 (GMT)
commit2e6effd2e0d8e60ede4aa528e771430071c546b4 (patch)
tree89203a42d0ed66fc8785b669446b1962ecbd8005 /Tests
parentd615ce4386f98cfac4d90e136cb272ec2d635e15 (diff)
parentda5ac4bb602bafb97b4dc0e012f1d26bbab58e3a (diff)
downloadCMake-2e6effd2e0d8e60ede4aa528e771430071c546b4.zip
CMake-2e6effd2e0d8e60ede4aa528e771430071c546b4.tar.gz
CMake-2e6effd2e0d8e60ede4aa528e771430071c546b4.tar.bz2
Merge topic 'cpack-install-multiple-configurations'
da5ac4bb60 cpack: Add `CPACK_INSTALL_CMAKE_CONFIGURATIONS` variable d4e6b2ae25 Refactor: Use `unique_ptr` instead of raw pointer Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3533
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ExpectedFiles.cmake3
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ZIP-stdout.txt3
-rw-r--r--Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/test.cmake9
4 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index d93f280..8e98961 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -36,3 +36,6 @@ run_cpack_test(MD5SUMS "DEB.MD5SUMS" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(CPACK_INSTALL_SCRIPTS "singular;plural;both" "ZIP" false "MONOLITHIC")
run_cpack_test(DEB_PACKAGE_VERSION_BACK_COMPATIBILITY "DEB.DEB_PACKAGE_VERSION_BACK_COMPATIBILITY" false "MONOLITHIC;COMPONENT")
run_cpack_test_subtests(EXTERNAL "none;good;good_multi;bad_major;bad_minor;invalid_good;invalid_bad;stage_and_package" "External" false "MONOLITHIC;COMPONENT")
+if(RunCMake_GENERATOR MATCHES "Visual Studio|Xcode")
+ run_cpack_test(CPACK_INSTALL_CMAKE_CONFIGURATIONS "ZIP" false "MONOLITHIC")
+endif()
diff --git a/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ExpectedFiles.cmake
new file mode 100644
index 0000000..34c7f8a
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ExpectedFiles.cmake
@@ -0,0 +1,3 @@
+set(EXPECTED_FILES_COUNT "1")
+
+set(EXPECTED_FILE_CONTENT_1_LIST "foo;foo/debug.txt;foo/release.txt")
diff --git a/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ZIP-stdout.txt b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ZIP-stdout.txt
new file mode 100644
index 0000000..2a3aa9e
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/ZIP-stdout.txt
@@ -0,0 +1,3 @@
+CPack: Install projects
+CPack: - Install project: CPACK_INSTALL_CMAKE_CONFIGURATIONS-MONOLITHIC-type \[Debug\]
+CPack: - Install project: CPACK_INSTALL_CMAKE_CONFIGURATIONS-MONOLITHIC-type \[Release\]
diff --git a/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/test.cmake b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/test.cmake
new file mode 100644
index 0000000..4f562cf
--- /dev/null
+++ b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_CMAKE_CONFIGURATIONS/test.cmake
@@ -0,0 +1,9 @@
+set(CMAKE_CONFIGURATION_TYPES Debug Release)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/debug.txt" "debug content")
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/release.txt" "release content")
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/debug.txt" DESTINATION "foo" CONFIGURATIONS Debug)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/release.txt" DESTINATION "foo" CONFIGURATIONS Release)
+
+set(CPACK_INSTALL_CMAKE_CONFIGURATIONS ${CMAKE_CONFIGURATION_TYPES})