diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-10-12 17:15:03 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-10-12 17:15:03 (GMT) |
commit | f9dc5b5553c5292dbffacc2b37a4f874af7d7275 (patch) | |
tree | 77aff9d23ba7f46213e15bf4ffa304fd8df012f6 /Modules | |
parent | e607d5f7df26f8e8c9efa0eece2be1662ca54725 (diff) | |
download | CMake-f9dc5b5553c5292dbffacc2b37a4f874af7d7275.zip CMake-f9dc5b5553c5292dbffacc2b37a4f874af7d7275.tar.gz CMake-f9dc5b5553c5292dbffacc2b37a4f874af7d7275.tar.bz2 |
ENH: On Visual Studio and Xcode handle config type
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CTestTargets.cmake | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake index a90294d2..bb4cdee 100644 --- a/Modules/CTestTargets.cmake +++ b/Modules/CTestTargets.cmake @@ -29,16 +29,22 @@ ENDIF(CTEST_NEW_FORMAT) # These should NOT need to be modified from project to project. # +SET(__conf_types "") +IF(CMAKE_CONFIGURATION_TYPES) + # We need to pass the configuration type on the test command line. + SET(__conf_types -C "${CMAKE_CFG_INTDIR}") +ENDIF(CMAKE_CONFIGURATION_TYPES) + # add testing targets IF(${CMAKE_MAKE_PROGRAM} MATCHES make) FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck) - ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} -D ${mode}) + ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}) ENDFOREACH(mode) ELSE(${CMAKE_MAKE_PROGRAM} MATCHES make) # for IDE only add them once for nested projects IF (NOT DART_COMMON_TARGETS_ADDED) FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck) - ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} -D ${mode}) + ADD_CUSTOM_TARGET(${mode} ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}) ENDFOREACH(mode) SET (DART_COMMON_TARGETS_ADDED 1) ENDIF (NOT DART_COMMON_TARGETS_ADDED) @@ -53,7 +59,7 @@ IF(${CMAKE_MAKE_PROGRAM} MATCHES make) FOREACH(testtype Start Update Configure Build Test Coverage MemCheck Submit) # missing purify ADD_CUSTOM_TARGET(${mode}${testtype} - ${CMAKE_CTEST_COMMAND} -D ${mode}${testtype}) + ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype}) ENDFOREACH(testtype) ENDFOREACH(mode) ENDIF (${CMAKE_MAKE_PROGRAM} MATCHES make) |