CTEST_NO_TESTS_ACTIONΒΆ

Added in version 3.26.

This is a CMake Environment Variable. Its initial value is taken from the calling process environment.

Environment variable that controls how ctest handles cases when there are no tests to run. Possible values are: error, ignore, empty or unset.

The --no-tests=<action> option to ctest overrides this environment variable if both are given.

When ctest --preset is used, this environment variable, if set, takes precedence over the noTestsAction field of the selected test preset. This includes the case where the variable is instead set via the preset's own environment field, which is equivalent to setting it in the calling process's environment. An explicit --no-tests=<action> on the command line takes precedence over all of the above.

This environment variable, including when set via a test preset's environment field, is also respected when that same preset is used by a ctest_test() command in a Dashboard Client via CTest Script. However, in that case, the preset's noTestsAction field itself has no effect, because ctest_test() has no equivalent argument to apply it through.