Google Test does not find tests if DownloadProject is used in a subdirectory
Closed this issue · 1 comments
daixtrose commented
I tried to follow the example and docs to the word, but introduced some directory structure (see
demo.zip)
Now cmake will not complain on Ubuntu 16.04 and build the executable and the test executable, but the tests are not found when invoking ctest -V
or make test
. Any idea what might have gone wrong?
daixtrose commented
OK, I found out I need enable_testing()
in the top level CMakeLists.txt
:
enable_testing() ## add this line
add_subdirectory(test)