ENH: Add testing for cpack

This commit is contained in:
Andy Cedilnik 2006-03-08 13:13:48 -05:00
parent bde71e9668
commit cd62290147
2 changed files with 70 additions and 32 deletions

View File

@ -145,7 +145,9 @@ ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
INCLUDE(CPack)
ADD_CUSTOM_COMMAND(
IF(APPLE AND NOT CTEST_TEST_CPACK)
# Issue with packaging on the mac, so disable it for now
ADD_CUSTOM_COMMAND(
TARGET ${install_target}
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}
@ -158,6 +160,23 @@ ADD_CUSTOM_COMMAND(
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-noclean
--build-target install
# --build-target package
COMMENT "Install Project"
)
ELSE(APPLE NOT CTEST_TEST_CPACK)
ADD_CUSTOM_COMMAND(
TARGET ${install_target}
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}
ARGS ${SI_CONFIG}
--build-and-test
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
--build-generator ${CMAKE_GENERATOR}
--build-project ${PROJECT_NAME}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-noclean
--build-target install
--build-target package
COMMENT "Install Project"
)
ENDIF(APPLE NOT CTEST_TEST_CPACK)

View File

@ -145,7 +145,9 @@ ENDIF(WIN32 AND NOT UNIX)
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
INCLUDE(CPack)
ADD_CUSTOM_COMMAND(
IF(APPLE AND NOT CTEST_TEST_CPACK)
# Issue with packaging on the mac, so disable it for now
ADD_CUSTOM_COMMAND(
TARGET ${install_target}
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}
@ -158,6 +160,23 @@ ADD_CUSTOM_COMMAND(
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-noclean
--build-target install
# --build-target package
COMMENT "Install Project"
)
ELSE(APPLE NOT CTEST_TEST_CPACK)
ADD_CUSTOM_COMMAND(
TARGET ${install_target}
POST_BUILD
COMMAND ${CMAKE_CTEST_COMMAND}
ARGS ${SI_CONFIG}
--build-and-test
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
--build-generator ${CMAKE_GENERATOR}
--build-project ${PROJECT_NAME}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-noclean
--build-target install
--build-target package
COMMENT "Install Project"
)
ENDIF(APPLE NOT CTEST_TEST_CPACK)