CTestAdapter with VS2017 CMake project support looks for tests in source dir instead of binary dir
Closed this issue · 1 comments
puetzk commented
When using the new VS2017 15.3 built-in CMake project support, BuildConfiguration.SolutionDir returns the returns the folder containing the CMakeLists.txt, since there is no .sln file. This eventually causes CTestContainerDiscoverer.UpdateListOfValidTests to use the wrong working dir for its ctest -N
call, and thus to discover no tests (because the CTestTestfile.cmake files are in the binary dir, not the source dir).
This is different than using the CMake "Visual Studio..." generator, where CMake generates .vcxproj and .sln files, because in that case the generated solution file is in the CMAKE_BINARY_DIR.