diff options
author | Betsy McPhail <betsy.mcphail@kitware.com> | 2019-07-18 19:40:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-19 15:49:05 (GMT) |
commit | 6a35d630dce6e9da6115cc4acb3393ce62a017ad (patch) | |
tree | eb4bcf229a577f91b22b3711a3e1264d2bd83eb9 /Help/guide | |
parent | 61d4d990d620815fac62ccbb28cf522703dde923 (diff) | |
download | CMake-6a35d630dce6e9da6115cc4acb3393ce62a017ad.zip CMake-6a35d630dce6e9da6115cc4acb3393ce62a017ad.tar.gz CMake-6a35d630dce6e9da6115cc4acb3393ce62a017ad.tar.bz2 |
Tutorial: Improve Step 8
* Remove comments from CTestConfig.cmake
* Update directions
Diffstat (limited to 'Help/guide')
-rw-r--r-- | Help/guide/tutorial/Complete/CTestConfig.cmake | 7 | ||||
-rw-r--r-- | Help/guide/tutorial/Step10/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Help/guide/tutorial/Step10/CTestConfig.cmake | 7 | ||||
-rw-r--r-- | Help/guide/tutorial/Step11/CTestConfig.cmake | 7 | ||||
-rw-r--r-- | Help/guide/tutorial/Step8/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Help/guide/tutorial/Step9/CTestConfig.cmake | 8 | ||||
-rw-r--r-- | Help/guide/tutorial/index.rst | 23 |
7 files changed, 36 insertions, 20 deletions
diff --git a/Help/guide/tutorial/Complete/CTestConfig.cmake b/Help/guide/tutorial/Complete/CTestConfig.cmake new file mode 100644 index 0000000..73efdb1 --- /dev/null +++ b/Help/guide/tutorial/Complete/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "CMakeTutorial") +set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=CMakeTutorial") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Help/guide/tutorial/Step10/CMakeLists.txt b/Help/guide/tutorial/Step10/CMakeLists.txt index 6a59104..34ae70c 100644 --- a/Help/guide/tutorial/Step10/CMakeLists.txt +++ b/Help/guide/tutorial/Step10/CMakeLists.txt @@ -38,7 +38,7 @@ install(FILES "${PROJECT_BINARY_DIR}/TutorialConfig.h" ) # enable testing -enable_testing() +include(CTest) # does the application run add_test(NAME Runs COMMAND Tutorial 25) diff --git a/Help/guide/tutorial/Step10/CTestConfig.cmake b/Help/guide/tutorial/Step10/CTestConfig.cmake new file mode 100644 index 0000000..73efdb1 --- /dev/null +++ b/Help/guide/tutorial/Step10/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "CMakeTutorial") +set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=CMakeTutorial") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Help/guide/tutorial/Step11/CTestConfig.cmake b/Help/guide/tutorial/Step11/CTestConfig.cmake new file mode 100644 index 0000000..73efdb1 --- /dev/null +++ b/Help/guide/tutorial/Step11/CTestConfig.cmake @@ -0,0 +1,7 @@ +set(CTEST_PROJECT_NAME "CMakeTutorial") +set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") + +set(CTEST_DROP_METHOD "http") +set(CTEST_DROP_SITE "my.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=CMakeTutorial") +set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Help/guide/tutorial/Step8/CMakeLists.txt b/Help/guide/tutorial/Step8/CMakeLists.txt index 2859049..19b9913 100644 --- a/Help/guide/tutorial/Step8/CMakeLists.txt +++ b/Help/guide/tutorial/Step8/CMakeLists.txt @@ -50,7 +50,7 @@ set_tests_properties(Usage # define a function to simplify adding tests function(do_test target arg result) -add_test(NAME Comp${arg} COMMAND ${target} ${arg}) + add_test(NAME Comp${arg} COMMAND ${target} ${arg}) set_tests_properties(Comp${arg} PROPERTIES PASS_REGULAR_EXPRESSION ${result} ) diff --git a/Help/guide/tutorial/Step9/CTestConfig.cmake b/Help/guide/tutorial/Step9/CTestConfig.cmake index 7a927ac..73efdb1 100644 --- a/Help/guide/tutorial/Step9/CTestConfig.cmake +++ b/Help/guide/tutorial/Step9/CTestConfig.cmake @@ -1,11 +1,3 @@ -## This file should be placed in the root directory of your project. -## Then modify the CMakeLists.txt file in the root directory of your -## project to incorporate the testing dashboard. -## -## # The following are required to submit to the CDash dashboard: -## ENABLE_TESTING() -## INCLUDE(CTest) - set(CTEST_PROJECT_NAME "CMakeTutorial") set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") diff --git a/Help/guide/tutorial/index.rst b/Help/guide/tutorial/index.rst index 22f3527..f6fd580 100644 --- a/Help/guide/tutorial/index.rst +++ b/Help/guide/tutorial/index.rst @@ -578,10 +578,9 @@ Adding Support for a Dashboard (Step 8) ======================================= Adding support for submitting our test results to a dashboard is very easy. We -already defined a number of tests for our project in the earlier steps of this -tutorial. We just have to run those tests and submit them to a dashboard. To -include support for dashboards we include the CTest module in our top-level -``CMakeLists.txt``. +already defined a number of tests for our project in `Testing Support`_. Now we +just have to run those tests and submit them to a dashboard. To include support +for dashboards we include the CTest module in our top-level ``CMakeLists.txt``. Replace: @@ -600,21 +599,25 @@ With: The CTest module will automatically call ``enable_testing()``, so we can remove it from our CMake files. -We will also need to create a ``CTestConfig.cmake`` file where we can specify -the name of the project and where to submit the dashboard. +We will also need to create a ``CTestConfig.cmake`` file in the top-level +directory where we can specify the name of the project and where to submit the +dashboard. .. literalinclude:: Step9/CTestConfig.cmake :language: cmake CTest will read in this file when it runs. To create a simple dashboard you can run **cmake** or **cmake-gui** to configure the project, but do not build it -yet. Instead, change directory to the binary tree, and then run: +yet. Instead, change directory to the binary tree, and then run:: -.. code-block:: console + ctest [-VV] –D Experimental + +Remember, for multi-config generators (e.g. Visual Studio), the configuration +type must be specified:: - 'ctest [-VV] –D Experimental' + ctest [-VV] -C Debug –D Experimental -On Windows, build the EXPERIMENTAL target. +Or, from an IDE, build the ``Experimental`` target. Ctest will build and test the project and submit the results to the Kitware public dashboard. The results of your dashboard will be uploaded to Kitware's |