diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-04-28 13:58:15 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-04-28 13:58:15 (GMT) |
commit | cd09448a5396a9b06f461237339b3736f05122e8 (patch) | |
tree | 152620ed12b32362173d64fc5c47e328ff4d5e3e | |
parent | d57ba7cb3ca7440f175be9f55b1d7a1d2f3e9907 (diff) | |
download | CMake-cd09448a5396a9b06f461237339b3736f05122e8.zip CMake-cd09448a5396a9b06f461237339b3736f05122e8.tar.gz CMake-cd09448a5396a9b06f461237339b3736f05122e8.tar.bz2 |
ENH: Allow overwriting CTestConfig.cmake items
-rw-r--r-- | Modules/CTest.cmake | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 76f2568..7b737fa 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -18,19 +18,26 @@ IF(BUILD_TESTING) ENDIF("${val}" MATCHES "^$") ENDMACRO(SET_IF_SET) + MACRO(SET_IF_SET_AND_NOT_SET var val) + IF("${val}" MATCHES "^$") + ELSE("${val}" MATCHES "^$") + SET_IF_NOT_SET("${var}" "${val}") + ENDIF("${val}" MATCHES "^$") + ENDMACRO(SET_IF_SET_AND_NOT_SET) + # Make sure testing is enabled ENABLE_TESTING() IF(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake") INCLUDE("${PROJECT_SOURCE_DIR}/CTestConfig.cmake") - SET_IF_SET(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}") - SET_IF_SET(DROP_METHOD "${CTEST_DROP_METHOD}") - SET_IF_SET(DROP_SITE "${CTEST_DROP_SITE}") - SET_IF_SET(DROP_SITE_USER "${CTEST_DROP_SITE_USER}") - SET_IF_SET(DROP_SITE_PASSWORD "${CTEST_DROP_SITE_PASWORD}") - SET_IF_SET(DROP_SITE_MODE "${CTEST_DROP_SITE_MODE}") - SET_IF_SET(DROP_LOCATION "${CTEST_DROP_LOCATION}") - SET_IF_SET(TRIGGER_SITE "${CTEST_TRIGGER_SITE}") + SET_IF_SET_AND_NOT_SET(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}") + SET_IF_SET_AND_NOT_SET(DROP_METHOD "${CTEST_DROP_METHOD}") + SET_IF_SET_AND_NOT_SET(DROP_SITE "${CTEST_DROP_SITE}") + SET_IF_SET_AND_NOT_SET(DROP_SITE_USER "${CTEST_DROP_SITE_USER}") + SET_IF_SET_AND_NOT_SET(DROP_SITE_PASSWORD "${CTEST_DROP_SITE_PASWORD}") + SET_IF_SET_AND_NOT_SET(DROP_SITE_MODE "${CTEST_DROP_SITE_MODE}") + SET_IF_SET_AND_NOT_SET(DROP_LOCATION "${CTEST_DROP_LOCATION}") + SET_IF_SET_AND_NOT_SET(TRIGGER_SITE "${CTEST_TRIGGER_SITE}") ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake") # the project can have a DartConfig.cmake file |