Closed TheLartians closed 3 years ago
@TheLartians IMHO the problem is caused by doctest.
@TheLartians IMHO the problem is caused by doctest.
see 75c10df#diff-33394812ba204689144fd2f80832db83853ba1cb32403edb4e15fe4893e675fdR61
No!
IMHO we have to prevent the extern project do run their tests at all
bash-3.2$ ninja options_test
[0/2] Re-checking globbed directories...
[3/3] Linking CXX executable _deps/cxxopts-build/test/options_test
bash-3.2$
bash-3.2$ ctest
Test project /Users/clausklein/Workspace/cpp/ModernCppStarter/build/all
Start 1: options
1/4 Test #1: options .......................... Passed 0.01 sec
Start 2: find-package-test
2/4 Test #2: find-package-test ................ Passed 3.01 sec
Start 3: add-subdirectory-test
3/4 Test #3: add-subdirectory-test ............ Passed 3.03 sec
Start 4: greeterTests
4/4 Test #4: greeterTests ..................... Passed 0.01 sec
100% tests passed, 0 tests failed out of 4
Total Test time (real) = 6.05 sec
it is caused by CXXOPTS_BUILD_TESTS
Fixed by #91
Introduced by using the new shorthand syntax which excludes inner targets. However, this doesn't prevent
cxxopts
from adding its tests the main tests target. We should therefore add the flag to disable tests again.Originally posted by @ClausKlein in https://github.com/TheLartians/ModernCppStarter/pull/88#issuecomment-788682734