cmake_test/add_dir
- cmake_test/add_dir.ct_add_dir(test_dir **kwargs)
This function will find all
*.cmake
files in the specified directory as well as recursively through all subdirectories. It will then configure the boilerplate template to include() each cmake file and register each configured boilerplate with CTest. The configured templates will be executed seperately via CTest during the Test phase, and each *.cmake file found in the specified directory is assumed to contain CMakeTest tests.- Parameters:
test_dir (path) – The directory to search for *.cmake files containing tests. Subdirectories will be recursively searched.
Keyword Arguments
- Parameters:
CT_DEBUG_MODE_ON (bool) – Enables debug mode when the tests are run.
USE_REL_PATH_NAMES (bool) – Enables using shorter, relative paths for test names, but increases the chance of name collisions.
LABEL (bool) – Use relative directory name for CTest label for all the tests in the directory. Run a group of labeled tests with ctest -L <label>
LABEL_NAME (str) – CTest label for all the tests in the directory. Run a group of labeled tests with ctest -L <label>. This argument has higher priority than LABEL
CMAKE_OPTIONS (list) – List of additional CMake options to be passed to all test invocations. Options should follow the syntax:
-D<variable_name>=<value>