Skip to content

Commit

Permalink
Fix linkage with googletest (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict authored Mar 25, 2024
1 parent 0ec2039 commit e6b4757
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ if(SPFFT_BUILD_TESTS)
)
FetchContent_MakeAvailable(googletest)
else()
find_package(googletest CONFIG REQUIRED)
find_package(GTest CONFIG REQUIRED)
endif()
list(APPEND SPFFT_TEST_LIBRARIES gtest_main)
list(APPEND SPFFT_TEST_LIBRARIES GTest::gtest_main)

# add command line parser
if(SPFFT_BUNDLED_CLI11)
Expand Down Expand Up @@ -65,7 +65,7 @@ if(SPFFT_BUILD_TESTS)
local_tests/test_fftw_prop_hash.cpp
local_tests/test_local_transform.cpp
)
target_link_libraries(run_local_tests PRIVATE gtest_main)
target_link_libraries(run_local_tests PRIVATE GTest::gtest_main)
target_link_libraries(run_local_tests PRIVATE spfft_test ${SPFFT_EXTERNAL_LIBS})
target_include_directories(run_local_tests PRIVATE ${SPFFT_INCLUDE_DIRS} ${SPFFT_EXTERNAL_INCLUDE_DIRS})

Expand All @@ -78,7 +78,7 @@ if(SPFFT_BUILD_TESTS)
mpi_tests/test_transpose.cpp
mpi_tests/test_transpose_gpu.cpp
)
target_link_libraries(run_mpi_tests PRIVATE gtest_main)
target_link_libraries(run_mpi_tests PRIVATE GTest::gtest_main)
target_link_libraries(run_mpi_tests PRIVATE spfft_test ${SPFFT_EXTERNAL_LIBS})
target_include_directories(run_mpi_tests PRIVATE ${SPFFT_INCLUDE_DIRS} ${SPFFT_EXTERNAL_INCLUDE_DIRS})
endif()
Expand Down

0 comments on commit e6b4757

Please sign in to comment.