File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -97,16 +97,14 @@ endif()
9797function (add_unit_test test_source_file )
9898 get_filename_component (test_name "${test_source_file} " NAME_WE )
9999 add_executable ("${test_name} " "${test_source_file} " )
100- target_link_libraries ("${test_name} " GTest:: gtest GTest:: gmock GTest:: gtest_main )
100+ target_link_libraries ("${test_name} " gtest gmock gtest_main )
101101 add_test (NAME ${test_name} COMMAND $<TARGET_FILE :${test_name} >)
102102 set_target_properties (${test_name} PROPERTIES FOLDER "Tests" )
103103endfunction ()
104104
105105# Target must already exist
106106macro (add_gtest TESTNAME )
107- target_link_libraries (
108- ${TESTNAME} PUBLIC GTest::gtest GTest::gmock GTest::gtest_main
109- )
107+ target_link_libraries (${TESTNAME} PUBLIC gtest gmock gtest_main )
110108
111109 if (GOOGLE_TEST_INDIVIDUAL)
112110 gtest_discover_tests (
Original file line number Diff line number Diff line change @@ -165,8 +165,8 @@ else()
165165 target_compile_options (test_all_unit_base PRIVATE /wd4459 )
166166 endif ()
167167 target_link_libraries (
168- test_all_unit_base GTest:: gtest GTest:: gmock GTest::gtest_main
169- ${UNITS_LC_PROJECT_NAME} ::units compile_flags_target
168+ test_all_unit_base gtest gmock gtest_main ${UNITS_LC_PROJECT_NAME} ::units
169+ compile_flags_target
170170 )
171171 set_target_properties (test_all_unit_base PROPERTIES FOLDER "Tests" )
172172 # test_all_unit_base should not be added to the tests it will take a long time run
You can’t perform that action at this time.
0 commit comments