ENH: On Visual Studio and Xcode handle config type

This commit is contained in:
Andy Cedilnik 2006-10-12 13:15:03 -04:00
parent e607d5f7df
commit f9dc5b5553
1 changed files with 9 additions and 3 deletions

View File

@ -29,16 +29,22 @@ ENDIF(CTEST_NEW_FORMAT)
# These should NOT need to be modified from project to project. # 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 # add testing targets
IF(${CMAKE_MAKE_PROGRAM} MATCHES make) IF(${CMAKE_MAKE_PROGRAM} MATCHES make)
FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck) 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) ENDFOREACH(mode)
ELSE(${CMAKE_MAKE_PROGRAM} MATCHES make) ELSE(${CMAKE_MAKE_PROGRAM} MATCHES make)
# for IDE only add them once for nested projects # for IDE only add them once for nested projects
IF (NOT DART_COMMON_TARGETS_ADDED) IF (NOT DART_COMMON_TARGETS_ADDED)
FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck) 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) ENDFOREACH(mode)
SET (DART_COMMON_TARGETS_ADDED 1) SET (DART_COMMON_TARGETS_ADDED 1)
ENDIF (NOT DART_COMMON_TARGETS_ADDED) 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) FOREACH(testtype Start Update Configure Build Test Coverage MemCheck Submit)
# missing purify # missing purify
ADD_CUSTOM_TARGET(${mode}${testtype} ADD_CUSTOM_TARGET(${mode}${testtype}
${CMAKE_CTEST_COMMAND} -D ${mode}${testtype}) ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype})
ENDFOREACH(testtype) ENDFOREACH(testtype)
ENDFOREACH(mode) ENDFOREACH(mode)
ENDIF (${CMAKE_MAKE_PROGRAM} MATCHES make) ENDIF (${CMAKE_MAKE_PROGRAM} MATCHES make)