summaryrefslogtreecommitdiffstats
path: root/Tests/GoogleTest/CMakeLists.txt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2017-05-14 10:16:27 (GMT)
committerCraig Scott <craig.scott@crascit.com>2017-05-15 21:57:27 (GMT)
commit6edd1806ddbfc4138dc9987d2a9c7c4fed56306b (patch)
treec7de7973de6e0958a98e61d39ef5b37a1a21da93 /Tests/GoogleTest/CMakeLists.txt
parent836cb52e9aec83f88841cb5b45abb1d32bb02214 (diff)
downloadCMake-6edd1806ddbfc4138dc9987d2a9c7c4fed56306b.zip
CMake-6edd1806ddbfc4138dc9987d2a9c7c4fed56306b.tar.gz
CMake-6edd1806ddbfc4138dc9987d2a9c7c4fed56306b.tar.bz2
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.
Diffstat (limited to 'Tests/GoogleTest/CMakeLists.txt')
-rw-r--r--Tests/GoogleTest/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/GoogleTest/CMakeLists.txt b/Tests/GoogleTest/CMakeLists.txt
new file mode 100644
index 0000000..21f8b8b
--- /dev/null
+++ b/Tests/GoogleTest/CMakeLists.txt
@@ -0,0 +1,10 @@
+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>
+ )