Skip to content

Commit 2b61618

Browse files
committed
Improve robustness of tests/CMakeLists.txt
1 parent ae1ee66 commit 2b61618

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ function(add_test_target TEST_PROGRAM SOURCE_FILES)
2020
add_executable(${TEST_PROGRAM} ${SOURCE_FILES})
2121
add_dependencies(${TEST_PROGRAM} LSMLIB::lsm)
2222
target_include_directories(${TEST_PROGRAM} PUBLIC ${GTEST_INCLUDE_DIRS})
23-
target_link_directories(${TEST_PROGRAM} PUBLIC ${GTEST_LIB_DIRS})
2423
target_link_libraries(
2524
${TEST_PROGRAM}
2625
PRIVATE lsm
27-
gtest
28-
gtest_main
26+
${GTEST_LIBRARIES}
27+
${GTEST_MAIN_LIBRARIES}
2928
${CMAKE_THREAD_LIBS_INIT}
3029
)
3130
endfunction()

0 commit comments

Comments
 (0)