ENH: Add testing for cpack
This commit is contained in:
parent
bde71e9668
commit
cd62290147
|
@ -145,19 +145,38 @@ ENDIF(WIN32 AND NOT UNIX)
|
||||||
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
|
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(
|
IF(APPLE AND NOT CTEST_TEST_CPACK)
|
||||||
TARGET ${install_target}
|
# Issue with packaging on the mac, so disable it for now
|
||||||
POST_BUILD
|
ADD_CUSTOM_COMMAND(
|
||||||
COMMAND ${CMAKE_CTEST_COMMAND}
|
TARGET ${install_target}
|
||||||
ARGS ${SI_CONFIG}
|
POST_BUILD
|
||||||
--build-and-test
|
COMMAND ${CMAKE_CTEST_COMMAND}
|
||||||
${CMAKE_SOURCE_DIR}
|
ARGS ${SI_CONFIG}
|
||||||
${CMAKE_BINARY_DIR}
|
--build-and-test
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
${CMAKE_SOURCE_DIR}
|
||||||
--build-project ${PROJECT_NAME}
|
${CMAKE_BINARY_DIR}
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-noclean
|
--build-project ${PROJECT_NAME}
|
||||||
--build-target install
|
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
||||||
# --build-target package
|
--build-noclean
|
||||||
COMMENT "Install Project"
|
--build-target install
|
||||||
)
|
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)
|
||||||
|
|
|
@ -145,19 +145,38 @@ ENDIF(WIN32 AND NOT UNIX)
|
||||||
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
|
SET(CPACK_PACKAGE_EXECUTABLES "SimpleInstall" "Simple Install")
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
ADD_CUSTOM_COMMAND(
|
IF(APPLE AND NOT CTEST_TEST_CPACK)
|
||||||
TARGET ${install_target}
|
# Issue with packaging on the mac, so disable it for now
|
||||||
POST_BUILD
|
ADD_CUSTOM_COMMAND(
|
||||||
COMMAND ${CMAKE_CTEST_COMMAND}
|
TARGET ${install_target}
|
||||||
ARGS ${SI_CONFIG}
|
POST_BUILD
|
||||||
--build-and-test
|
COMMAND ${CMAKE_CTEST_COMMAND}
|
||||||
${CMAKE_SOURCE_DIR}
|
ARGS ${SI_CONFIG}
|
||||||
${CMAKE_BINARY_DIR}
|
--build-and-test
|
||||||
--build-generator ${CMAKE_GENERATOR}
|
${CMAKE_SOURCE_DIR}
|
||||||
--build-project ${PROJECT_NAME}
|
${CMAKE_BINARY_DIR}
|
||||||
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
--build-generator ${CMAKE_GENERATOR}
|
||||||
--build-noclean
|
--build-project ${PROJECT_NAME}
|
||||||
--build-target install
|
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
|
||||||
# --build-target package
|
--build-noclean
|
||||||
COMMENT "Install Project"
|
--build-target install
|
||||||
)
|
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)
|
||||||
|
|
Loading…
Reference in New Issue