summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBetsy McPhail <betsy.mcphail@kitware.com>2019-01-20 16:28:39 (GMT)
committerBetsy McPhail <betsy.mcphail@kitware.com>2019-01-27 21:03:00 (GMT)
commitf2ddedfa5802c8aece994bb643b5139212d87777 (patch)
treef1dc800bf22bbfccbde4e1deb0c235986731e2cd /Tests/CMakeLists.txt
parent438651506a5417be70e71f54f4ed7add0c2604d3 (diff)
downloadCMake-f2ddedfa5802c8aece994bb643b5139212d87777.zip
CMake-f2ddedfa5802c8aece994bb643b5139212d87777.tar.gz
CMake-f2ddedfa5802c8aece994bb643b5139212d87777.tar.bz2
Tests: Update CMake tutorial
Latest material from data.kitware.com -> Collections -> Courses -> CMake.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt35
1 files changed, 27 insertions, 8 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 0c6eabc..ed98d97 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1704,18 +1704,37 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
DEPENDS ExternalProjectUpdateSetup )
# do each of the tutorial steps
- foreach(STP RANGE 1 7)
- add_test(TutorialStep${STP} ${CMAKE_CTEST_COMMAND}
+ function(add_tutorial_test step_name use_mymath)
+ set(tutorial_test_name Tutorial${step_name})
+ set(tutorial_build_dir "${CMake_BINARY_DIR}/Tests/Tutorial/${step_name}")
+ if (use_mymath)
+ set(tutorial_build_options "")
+ else()
+ set(tutorial_test_name ${tutorial_test_name}_MYMATH)
+ set(tutorial_build_dir "${tutorial_build_dir}_MYMATH")
+ set(tutorial_build_options -DUSE_MYMATH:BOOL=OFF)
+ endif()
+ add_test(${tutorial_test_name} ${CMAKE_CTEST_COMMAND}
--build-and-test
- "${CMake_SOURCE_DIR}/Tests/Tutorial/Step${STP}"
- "${CMake_BINARY_DIR}/Tests/Tutorial/Step${STP}"
- --build-two-config
+ "${CMake_SOURCE_DIR}/Tests/Tutorial/${step_name}"
+ ${tutorial_build_dir}_Build
${build_generator_args}
--build-project Tutorial
- --build-options ${build_options}
+ --build-options ${build_options} ${tutorial_build_options}
--test-command Tutorial 25.0)
- endforeach()
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Tutorial")
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/${tutorial_build_dir}_Build")
+ endfunction()
+
+ if(NOT CMake_TEST_EXTERNAL_CMAKE)
+ foreach(STP RANGE 1 11)
+ add_tutorial_test(Step${STP} TRUE)
+ endforeach()
+ add_tutorial_test(Complete TRUE)
+ foreach(STP RANGE 3 11)
+ add_tutorial_test(Step${STP} FALSE)
+ endforeach()
+ add_tutorial_test(Complete FALSE)
+ endif()
add_test(testing ${CMAKE_CTEST_COMMAND} -C \${CTEST_CONFIGURATION_TYPE}
--build-and-test