Skip to content
Snippets Groups Projects
Forked from iMSTK / iMSTK
3166 commits behind the upstream repository.
user avatar
Alexis Girault authored
ctests would currently only be created for each test file,
but the GTEST_ADD_TESTS function[1] could allow to register
all gtests as independent tests.

[1] https://cmake.org/cmake/help/v3.0/module/FindGTest.html

However, that function would not allow the use of a driver
executable, since it would force the `gtest_filter` flag to
appear right after the executable name in the command, while
a driver executable would need the name of the test file
beforehand.

This commit introduces a custom version of GTEST_ADD_TESTS
where `extra_args` is called before the `gtest_filter` flag
to allow the use of an executable driver.

Note: as noted in the doc above[1], testing each gtest is
slow since they all necessite the startup of an executable.
The previous option of testing per file is therefore kept
but commented. A future focus of interest could be to
customize `add_test` to then run all gtests at once like
GoogleTest does by default.
866e208d
History