Add KIM_EXTRA_UNITTESTS option

Add KIM_EXTRA_UNITTESTS option which defaults to OFF
and can be enabled on request to add a corresponding
pre-processor define to do extra tests.
This commit is contained in:
Yaser Afshar
2020-12-15 15:48:49 -06:00
parent df58a1fc5f
commit 47d18c9f90
2 changed files with 9 additions and 0 deletions

View File

@ -8,6 +8,13 @@ target_link_libraries(test_lattice_region PRIVATE lammps GTest::GMock GTest::GTe
add_test(NAME LatticeRegion COMMAND test_lattice_region WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_executable(test_kim_commands test_kim_commands.cpp)
if(KIM_EXTRA_UNITTESTS)
if(CURL_FOUND)
target_compile_definitions(test_kim_commands PRIVATE -DKIM_EXTRA_UNITTESTS)
else()
message(STATUS "CURL not found. Enabling KIM extra unit tests requires to have libcurl installed.")
endif()
endif()
target_link_libraries(test_kim_commands PRIVATE lammps GTest::GMock GTest::GTest)
add_test(NAME KimCommands COMMAND test_kim_commands WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})