diff options
author | William Sciaroni <William.Sciaroni@ngc.com> | 2023-11-08 16:05:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-11-10 18:19:11 (GMT) |
commit | 5e0c1777a3153fd9b3c1f98e1a584a4525da6141 (patch) | |
tree | 1ed15898abd7a04658574ae92108d864f2e887cb /Help | |
parent | eaa00d4dfa5ea7e611fc447d986bb10c41c7b0e1 (diff) | |
download | CMake-5e0c1777a3153fd9b3c1f98e1a584a4525da6141.zip CMake-5e0c1777a3153fd9b3c1f98e1a584a4525da6141.tar.gz CMake-5e0c1777a3153fd9b3c1f98e1a584a4525da6141.tar.bz2 |
Optionally make `test` target depend on `all`
Fixes: #8774
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-variables.7.rst | 1 | ||||
-rw-r--r-- | Help/release/dev/make-test-depend-on-all.rst | 6 | ||||
-rw-r--r-- | Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst | 2 | ||||
-rw-r--r-- | Help/variable/CMAKE_SKIP_TEST_ALL_DEPENDENCY.rst | 19 |
4 files changed, 28 insertions, 0 deletions
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index bf6fc0a..4ce3b2f 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -255,6 +255,7 @@ Variables that Change Behavior /variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES /variable/CMAKE_REQUIRE_FIND_PACKAGE_PackageName /variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY + /variable/CMAKE_SKIP_TEST_ALL_DEPENDENCY /variable/CMAKE_STAGING_PREFIX /variable/CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS /variable/CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE diff --git a/Help/release/dev/make-test-depend-on-all.rst b/Help/release/dev/make-test-depend-on-all.rst new file mode 100644 index 0000000..ef43faf --- /dev/null +++ b/Help/release/dev/make-test-depend-on-all.rst @@ -0,0 +1,6 @@ +make-test-depend-on-all +----------------------- + +* The :variable:`CMAKE_SKIP_TEST_ALL_DEPENDENCY` variable was added + to control whether the ``test`` (or ``RUN_TESTS``) buildsystem + target depends on the ``all`` (or ``ALL_BUILD``) target. diff --git a/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst b/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst index e88db36..69c762b 100644 --- a/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst +++ b/Help/variable/CMAKE_SKIP_INSTALL_ALL_DEPENDENCY.rst @@ -9,3 +9,5 @@ built, first the ``all`` target is built, then the installation starts. If ``CMAKE_SKIP_INSTALL_ALL_DEPENDENCY`` is set to ``TRUE``, this dependency is not created, so the installation process will start immediately, independent from whether the project has been completely built or not. + +See also :variable:`CMAKE_SKIP_TEST_ALL_DEPENDENCY`. diff --git a/Help/variable/CMAKE_SKIP_TEST_ALL_DEPENDENCY.rst b/Help/variable/CMAKE_SKIP_TEST_ALL_DEPENDENCY.rst new file mode 100644 index 0000000..bae8e99 --- /dev/null +++ b/Help/variable/CMAKE_SKIP_TEST_ALL_DEPENDENCY.rst @@ -0,0 +1,19 @@ +CMAKE_SKIP_TEST_ALL_DEPENDENCY +------------------------------ + +.. versionadded:: 3.29 + +Control whether the ``test`` target depends on the ``all`` target. + +If this variable is not defined, or is set to ``TRUE``, then the +``test`` (or ``RUN_TESTS``) target does not depend on the +``all`` (or ``ALL_BUILD``) target. When the ``test`` target is built, +e.g., via ``make test``, the test process will start immediately, +regardless of whether the project has been completely built or not. + +If ``CMAKE_SKIP_TEST_ALL_DEPENDENCY`` is explicitly set to ``FALSE``, +then the ``test`` target will depend on the ``all`` target. When the +``test`` target is built, e.g., via ``make test``, the ``all`` target +will be built first, and then the tests will run. + +See also :variable:`CMAKE_SKIP_INSTALL_ALL_DEPENDENCY`. |