https://github.com/Kitware/CMake
Revision 3b4838b57fc70bd64b29044ccbdf582f14a0574d authored by Ryan Thornton on 16 March 2020, 20:16:38 UTC, committed by Ryan Thornton on 27 March 2020, 14:40:40 UTC
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>
1 parent 1ba4cb5
History
Tip revision: 3b4838b57fc70bd64b29044ccbdf582f14a0574d authored by Ryan Thornton on 16 March 2020, 20:16:38 UTC
GoogleTest: Add tests for MultiConfig discovery in PRE_TEST mode
Tip revision: 3b4838b
File Mode Size
.github
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 1.3 KB
.clang-tidy -rw-r--r-- 1010 bytes
.gitattributes -rw-r--r-- 1.1 KB
.gitignore -rw-r--r-- 132 bytes
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.7 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 11.9 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 31.2 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 3.1 KB
CTestConfig.cmake -rw-r--r-- 440 bytes
CTestCustom.cmake.in -rw-r--r-- 6.7 KB
CompileFlags.cmake -rw-r--r-- 4.2 KB
Copyright.txt -rw-r--r-- 5.2 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.9 KB
bootstrap -rwxr-xr-x 53.2 KB
cmake_uninstall.cmake.in -rw-r--r-- 789 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top