Closed thbeu closed 3 months ago
I'm a bit skeptical about such a IDE specific setting. Isn't rather the issue the WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" at line 31 of tests/CMakeLists.txt that should be instead ${CMAKE_SOURCE_DIR}/tests ?
Isn't rather the issue the WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" at line 31 of tests/CMakeLists.txt that should be instead ${CMAKE_SOURCE_DIR}/tests ?
According to all my many tries and the cited issue #143 there is no such CMake only fix to get the GTA running with proper working directory.
hum, but I'm puzzled by the discrepency between the existing ${PROJECT_SOURCE_DIR} in tests/CMakeLists.txt and @CMAKE_SOURCE_DIR@/tests in the new file of this PR. Any explanation why they don't match?
hum, but I'm puzzled by the discrepency between the existing ${PROJECT_SOURCE_DIR} in tests/CMakeLists.txt and @CMAKE_SOURCE_DIR@/tests in the new file of this PR. Any explanation why they don't match?
PROJECT_SOURCE_DIR of /tests/ subdir is the same as CMAKE_SOURCE_DIR/tests.
OK, fixed it. Now it relies on configure_file being called from /tests/CMakeLists.txt project.
Alternatively a UNITTEST_DIR variable could be introduced.
PROJECT_SOURCE_DIR of /tests/ subdir is the same as CMAKE_SOURCE_DIR/tests.
oh, I missed that tests/CMakeLists.txt defined a new project()...
The new file should also be listed in EXTRA_DIST of top Makefile.am
The new file should also be listed in EXTRA_DIST of top Makefile.am
I already did.
This PR generates the Run Settings file for the GoogleTestAdapter (GTA) with the expected working directory to run the GoogleTest based unit tests from Test Explorer in Visual Studio.
Resolves #143