fix cmake unit test issue

This commit is contained in:
Axel Kohlmeyer 2021-03-16 23:32:08 -04:00
parent 28e986c266
commit 78126c5eb3
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND PKG_PLUGIN)
endif()
add_executable(test_simple_commands test_simple_commands.cpp)
add_dependencies(test_simple_commands plugins)
if(PKG_PLUGIN)
add_dependencies(test_simple_commands plugins)
endif()
target_link_libraries(test_simple_commands PRIVATE lammps GTest::GMock GTest::GTest)
add_test(NAME SimpleCommands COMMAND test_simple_commands WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})