1
0
mirror of synced 2024-11-05 04:28:54 +01:00
modern-cmake/chapters/testing
Stuart Schechter 0347de327f I lost over a day trying to figure out why I couldn't set a working directory for tests. It turns out, you can't (at least for Visual Studio projects) if you used gtest_add_tests, but it works just fine using the more up to date gtest_discover_tests. This PR is written to facilitate two very common needs of testers: access to a working directory and the ability to include libraries (since, tests are often written to tests libraries.)
Changes:
Replace gtest_add_tests, which is outdated and causes problems (especially in Windows & visual studio) with gtest_discover_tests.
Modified macros to show how working directories are set
Add example that sets working directory and uses custom libraries.
Add include(GoogleTest), which seems to be necessary on some platforms
2019-09-26 23:17:15 +00:00
..
catch.md Adding catch and some fixes 2018-03-30 15:15:37 +02:00
googletest.md I lost over a day trying to figure out why I couldn't set a working directory for tests. It turns out, you can't (at least for Visual Studio projects) if you used gtest_add_tests, but it works just fine using the more up to date gtest_discover_tests. This PR is written to facilitate two very common needs of testers: access to a working directory and the ability to include libraries (since, tests are often written to tests libraries.) 2019-09-26 23:17:15 +00:00