CMake/Tests/GoogleTest/CMakeLists.txt
Craig Scott 6edd1806dd GoogleTest: Expand capabilities of gtest_add_tests()
Now has keyword-based arguments (old syntax form is still supported).
Discovered tests can have a prefix and/or suffix added to the test names
and the list of discovered tests is available to the caller. The working
dir can also be set and the dependency on the source files is now
optional instead of mandatory.
2017-05-16 07:57:27 +10:00

11 lines
355 B
CMake

add_test(NAME GoogleTest.Test COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/GoogleTest/Test"
"${CMake_BINARY_DIR}/Tests/GoogleTest/Test"
${build_generator_args}
--build-project TestGoogleTest
--build-options ${build_options}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)