diff options
author | Petr Kmoch <petr.kmoch@gmail.com> | 2012-10-12 13:30:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-13 14:08:42 (GMT) |
commit | b777272b0b165a62d61b745a394fe4fc99dc66ee (patch) | |
tree | ce7779ef002bb7f04a31014eb21698f5bc129b35 /Tests/CMakeLists.txt | |
parent | c31e119d246e06fd5cc8d4cbc50b8e0d78c852a0 (diff) | |
download | CMake-b777272b0b165a62d61b745a394fe4fc99dc66ee.zip CMake-b777272b0b165a62d61b745a394fe4fc99dc66ee.tar.gz CMake-b777272b0b165a62d61b745a394fe4fc99dc66ee.tar.bz2 |
Add tests for EXCLUDE_FROM_DEFAULT_BUILD
Add tests for EXCLUDE_FROM_DEFAULT_BUILD and its per-configuration
variants.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index bbf804b..7f05121 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1412,6 +1412,28 @@ ${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 + 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") + endforeach() + endif() endif() if (APPLE) |