summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-10-03 15:49:18 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-10-10 14:26:40 (GMT)
commitb56f2db87aebd34bfaf24439d56632aa3f3019f8 (patch)
treea0d473b712c59d6e4a9beb9f84bdea764db4e4b6 /Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
parentfc8955e8891c645cd369a3cc8b607a14a8ed5bd7 (diff)
downloadCMake-b56f2db87aebd34bfaf24439d56632aa3f3019f8.zip
CMake-b56f2db87aebd34bfaf24439d56632aa3f3019f8.tar.gz
CMake-b56f2db87aebd34bfaf24439d56632aa3f3019f8.tar.bz2
Testing: Add test for CMP0082
Diffstat (limited to 'Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
index 88b9283..343e65b 100644
--- a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake
@@ -4,6 +4,28 @@ run_cmake(DoesNotExist)
run_cmake(Missing)
run_cmake(Function)
+macro(run_cmake_install case)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ set(RunCMake_TEST_OPTIONS ${ARGN})
+
+ run_cmake(${case})
+ run_cmake_command(${case}-install ${CMAKE_COMMAND} -P cmake_install.cmake)
+ run_cmake_command(${case}-install-component ${CMAKE_COMMAND} -DCOMPONENT=Unspecified -P cmake_install.cmake)
+
+ unset(RunCMake_TEST_BINARY_DIR)
+ unset(RunCMake_TEST_NO_CLEAN)
+ unset(RunCMake_TEST_OPTIONS)
+endmacro()
+
+run_cmake_install(CMP0082-WARN)
+run_cmake_install(CMP0082-WARN-Nested)
+run_cmake_install(CMP0082-WARN-NestedSub)
+run_cmake_install(CMP0082-WARN-None)
+run_cmake_install(CMP0082-WARN-NoTopInstall)
+run_cmake_install(CMP0082-OLD -DCMP0082_VALUE=OLD)
+run_cmake_install(CMP0082-NEW -DCMP0082_VALUE=NEW)
+
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build)
set(RunCMake_TEST_NO_CLEAN 1)