GoogleTest: Add tests for MultiConfig discovery in PRE_TEST mode
PRE_TEST makes it possible to properly distinguish between test cases that exist only in certain configurations. In the new test scenario, debug tests are disabled in release builds, and release tests are disabled in debug builds when a multi config generator is used. Note, this is a bit of a hack and *only* works for PRE_TEST mode. POST_BUILD makes no attempt to get this right. It preserves the status quo and you obtain the tests that were last discovered. See further discussion in !4078 Ideally, the POST_BUILD behavior could be fixed by using generator expressions in OUTPUT and BYPRODUCT expressions. Then you could do something like: set(ctest_include_file "${ctest_file_base}_include-$<CONFIG>.cmake") set(ctest_tests_file "${ctest_file_base}_tests-$<CONFIG>.cmake") Once #12877 lands, maybe this can be revisited. Co-authored-by:Ryan Thornton <ThorntonRyan@JohnDeere.com> Co-authored-by:
Kevin Puetz <PuetzKevinA@JohnDeere.com>
This commit is part of merge request !4078. Comments created here will be created in the context of that merge request.