Use multi-config compatible way to integrate googletest for unit testing

This commit is contained in:
Axel Kohlmeyer
2021-09-11 04:46:13 -04:00
parent 0dd35bdb66
commit 84c945f7fb
10 changed files with 91 additions and 129 deletions

View File

@ -21,7 +21,7 @@ else()
endif()
add_executable(test_python_package test_python_package.cpp)
target_link_libraries(test_python_package PRIVATE lammps GTest::GMock GTest::GTest)
target_link_libraries(test_python_package PRIVATE lammps gmock)
target_compile_definitions(test_python_package PRIVATE -DTEST_INPUT_FOLDER=${TEST_INPUT_FOLDER})
# this requires CMake 3.12. don't care to add backward compatibility for this.
if(Python3_Development_FOUND)