summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-20 16:47:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-11-20 16:47:35 (GMT)
commit508504ab6f76bfd90a11a77cc1e59e604d41c47a (patch)
tree2713a8bb8ea84ace1c4359504ea7562b7a112ad2 /Tests/CMakeLists.txt
parentf673b3824708986bdb763cefd70898adc5701a82 (diff)
parent739f16653d823ea9519405da837cd57dcf204403 (diff)
downloadCMake-508504ab6f76bfd90a11a77cc1e59e604d41c47a.zip
CMake-508504ab6f76bfd90a11a77cc1e59e604d41c47a.tar.gz
CMake-508504ab6f76bfd90a11a77cc1e59e604d41c47a.tar.bz2
Merge topic 'per-config-EXCLUDE_FROM_DEFAULT_BUILD'
739f166 Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD e31d83b Define property EXCLUDE_FROM_DEFAULT_BUILD d1f8828 Add property EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG> b777272 Add tests for EXCLUDE_FROM_DEFAULT_BUILD
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 03a538f..f2a198c 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1442,6 +1442,35 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command VSMidl)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSMidl")
+
+ if(NOT MSVC60 AND NOT CMAKE_TEST_MAKEPROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]")
+ # The test (and tested property) works with .sln files, so it's skipped when:
+ # * Using VS6, which doesn't use .sln files
+ # * cmake --build is set up to use MSBuild, since the MSBuild invocation does not use the .sln file
+ set(_last_test "")
+ foreach(config ${CMAKE_CONFIGURATION_TYPES})
+ add_test(NAME VSExcludeFromDefaultBuild-${config} COMMAND ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/VSExcludeFromDefaultBuild"
+ "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild"
+ --build-config ${config}
+ --build-two-config
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project VSExcludeFromDefaultBuild
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --test-command ${CMAKE_COMMAND}
+ -D "activeConfig=${config}"
+ -D "allConfigs=${CMAKE_CONFIGURATION_TYPES}"
+ -D "dir=${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild"
+ -P "${CMake_SOURCE_DIR}/Tests/VSExcludeFromDefaultBuild/ResultTest.cmake")
+ if(_last_test)
+ set_property(TEST VSExcludeFromDefaultBuild-${config} PROPERTY DEPENDS ${_last_test})
+ endif()
+ set(_last_test "VSExcludeFromDefaultBuild-${config}")
+ endforeach()
+ unset(_last_test)
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild")
+ endif()
endif()
if (APPLE)