SimpleInstall test now builds an installer package if CTEST_TEST_CPACK is ON at the Tests/CMakeLists.txt level.

This commit is contained in:
David Cole 2009-11-16 15:35:04 -05:00
parent 69fdf711fe
commit 1412cc442e
3 changed files with 17 additions and 2 deletions

View File

@ -405,6 +405,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
--build-two-config --build-two-config
--build-options --build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}" "-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
"-DCTEST_TEST_CPACK:BOOL=${CTEST_TEST_CPACK}"
--test-command ${SimpleInstallInstallDir}/MyTest/bin/SimpleInstExe) --test-command ${SimpleInstallInstallDir}/MyTest/bin/SimpleInstExe)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SimpleInstall") LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SimpleInstall")
ADD_TEST(SimpleInstall-Stage2 ${CMAKE_CTEST_COMMAND} ADD_TEST(SimpleInstall-Stage2 ${CMAKE_CTEST_COMMAND}

View File

@ -364,14 +364,21 @@ SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
SET(CMAKE_INSTALL_MFC_LIBRARIES 1) SET(CMAKE_INSTALL_MFC_LIBRARIES 1)
SET(CMAKE_INSTALL_DEBUG_LIBRARIES 1) SET(CMAKE_INSTALL_DEBUG_LIBRARIES 1)
INCLUDE(InstallRequiredSystemLibraries) INCLUDE(InstallRequiredSystemLibraries)
INCLUDE(CPack)
IF(CTEST_TEST_CPACK) IF(CTEST_TEST_CPACK)
SET(PACKAGE_TARGET --build-target package) SET(PACKAGE_TARGET --build-target package)
# Avoid settings that require the .zip file command line tools...
# (just build an NSIS installer without component support)
#
SET(CPACK_BINARY_ZIP OFF)
SET(CPACK_MONOLITHIC_INSTALL ON)
ELSE(CTEST_TEST_CPACK) ELSE(CTEST_TEST_CPACK)
SET(PACKAGE_TARGET) SET(PACKAGE_TARGET)
ENDIF(CTEST_TEST_CPACK) ENDIF(CTEST_TEST_CPACK)
INCLUDE(CPack)
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
TARGET ${install_target} TARGET ${install_target}
POST_BUILD POST_BUILD

View File

@ -364,14 +364,21 @@ SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
SET(CMAKE_INSTALL_MFC_LIBRARIES 1) SET(CMAKE_INSTALL_MFC_LIBRARIES 1)
SET(CMAKE_INSTALL_DEBUG_LIBRARIES 1) SET(CMAKE_INSTALL_DEBUG_LIBRARIES 1)
INCLUDE(InstallRequiredSystemLibraries) INCLUDE(InstallRequiredSystemLibraries)
INCLUDE(CPack)
IF(CTEST_TEST_CPACK) IF(CTEST_TEST_CPACK)
SET(PACKAGE_TARGET --build-target package) SET(PACKAGE_TARGET --build-target package)
# Avoid settings that require the .zip file command line tools...
# (just build an NSIS installer without component support)
#
SET(CPACK_BINARY_ZIP OFF)
SET(CPACK_MONOLITHIC_INSTALL ON)
ELSE(CTEST_TEST_CPACK) ELSE(CTEST_TEST_CPACK)
SET(PACKAGE_TARGET) SET(PACKAGE_TARGET)
ENDIF(CTEST_TEST_CPACK) ENDIF(CTEST_TEST_CPACK)
INCLUDE(CPack)
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
TARGET ${install_target} TARGET ${install_target}
POST_BUILD POST_BUILD