diff options
author | Paweł Bylica <chfast@gmail.com> | 2020-01-23 20:29:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-24 15:18:36 (GMT) |
commit | fbd3ea2047bf1a09ff24d9a04078b75438ebd46b (patch) | |
tree | 7f71b1308d06085023f2e47798a51f8683c6656c /Tests/FindGTest | |
parent | ab2fc918216011a03f0fe7696e7bba67fc2627b3 (diff) | |
download | CMake-fbd3ea2047bf1a09ff24d9a04078b75438ebd46b.zip CMake-fbd3ea2047bf1a09ff24d9a04078b75438ebd46b.tar.gz CMake-fbd3ea2047bf1a09ff24d9a04078b75438ebd46b.tar.bz2 |
FindGTest: Add GTest::{gtest,gtest_main} library names
This introduces 2 new INTERFACE IMPORTED libraries: GTest::gtest and
GTest::gtest_main. They link to GTest::GTest and GTest::Main targets
respectively, therefore working as aliases. These new names map the
names of the targets from upstream GTest's CMake package config.
Fixes: #20255
Diffstat (limited to 'Tests/FindGTest')
-rw-r--r-- | Tests/FindGTest/Test/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/FindGTest/Test/CMakeLists.txt b/Tests/FindGTest/Test/CMakeLists.txt index b65b9d2..6537238 100644 --- a/Tests/FindGTest/Test/CMakeLists.txt +++ b/Tests/FindGTest/Test/CMakeLists.txt @@ -8,6 +8,10 @@ add_executable(test_gtest_tgt main.cxx) target_link_libraries(test_gtest_tgt GTest::Main) add_test(NAME test_gtest_tgt COMMAND test_gtest_tgt) +add_executable(test_gtest_tgt_upstream main.cxx) +target_link_libraries(test_gtest_tgt_upstream GTest::gtest_main) +add_test(NAME test_gtest_tgt_upstream COMMAND test_gtest_tgt_upstream) + add_executable(test_gtest_var main.cxx) target_include_directories(test_gtest_var PRIVATE ${GTEST_INCLUDE_DIRS}) target_link_libraries(test_gtest_var PRIVATE ${GTEST_BOTH_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) |