summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2015-03-26 04:36:38 (GMT)
committerBrad King <brad.king@kitware.com>2015-03-30 13:22:14 (GMT)
commite3f84fc504e96d1bdbc9c70434135903c449bdd1 (patch)
treed84713c563e0e876d6097d5b2c09a9d9429b7718 /Tests/CMakeLists.txt
parent51b4321e5fdf9f7cbc54881037a45a474883ef47 (diff)
downloadCMake-e3f84fc504e96d1bdbc9c70434135903c449bdd1.zip
CMake-e3f84fc504e96d1bdbc9c70434135903c449bdd1.tar.gz
CMake-e3f84fc504e96d1bdbc9c70434135903c449bdd1.tar.bz2
cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
Fix the case when the archive generator is used to package components with an install prefix.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt28
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 41032f8..f2df4af 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -862,6 +862,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set(CTEST_RUN_CPackComponents ${CTEST_TEST_CPACK})
set(CTEST_package_X11_TEST ${CTEST_TEST_CPACK})
set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK})
+ set(CTEST_RUN_CPackComponentsPrefix ${CTEST_TEST_CPACK})
# Do not try to build RPM
if (NOT RPMBUILD_EXECUTABLE)
@@ -1035,6 +1036,33 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackTestAllGenerators")
endif()
+ if(CTEST_RUN_CPackComponentsPrefix)
+ set(CPackComponents_BUILD_OPTIONS)
+ if(APPLE)
+ set(CPackComponents_BUILD_OPTIONS -DCPACK_BINARY_DRAGNDROP:BOOL=ON)
+ endif()
+ if(NOT NSIS_MAKENSIS_EXECUTABLE)
+ set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS}
+ -DCPACK_BINARY_NSIS:BOOL=OFF)
+ endif()
+
+ add_test(CPackComponentsPrefix ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/CPackComponentsPrefix"
+ "${CMake_BINARY_DIR}/Tests/CPackComponentsPrefix"
+ ${build_generator_args}
+ --build-project CPackComponentsPrefix
+ --build-two-config
+ --build-target package
+ --build-options ${build_options}
+ -DCPACK_BINARY_DEB:BOOL=${CPACK_BINARY_DEB}
+ -DCPACK_BINARY_RPM:BOOL=${CPACK_BINARY_RPM}
+ -DCPACK_BINARY_ZIP:BOOL=ON
+ ${CPackComponents_BUILD_OPTIONS}
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CPackComponentsPrefix")
+ endif()
+
if(CTEST_package_X11_TEST)
set(X11_build_target_arg --build-target package)
else()