2023-07-17 20:51:15 +00:00
|
|
|
if(ENABLE_TESTING)
|
|
|
|
set(TEST_MAIN "unit_tests")
|
2023-07-20 08:40:08 +00:00
|
|
|
include_directories(${BayesNet_SOURCE_DIR}/src/BayesNet)
|
|
|
|
include_directories(${BayesNet_SOURCE_DIR}/src/Platform)
|
2023-07-20 16:55:56 +00:00
|
|
|
include_directories(${BayesNet_SOURCE_DIR}/lib/Files)
|
|
|
|
include_directories(${BayesNet_SOURCE_DIR}/lib/mdlp)
|
2023-09-03 12:13:10 +00:00
|
|
|
include_directories(${BayesNet_SOURCE_DIR}/lib/json/include)
|
2023-09-29 16:20:46 +00:00
|
|
|
set(TEST_SOURCES BayesModels.cc BayesNetwork.cc ${BayesNet_SOURCES})
|
2023-07-17 20:51:15 +00:00
|
|
|
add_executable(${TEST_MAIN} ${TEST_SOURCES})
|
2023-07-20 16:55:56 +00:00
|
|
|
target_link_libraries(${TEST_MAIN} PUBLIC "${TORCH_LIBRARIES}" ArffFiles mdlp Catch2::Catch2WithMain)
|
2023-07-17 20:51:15 +00:00
|
|
|
add_test(NAME ${TEST_MAIN} COMMAND ${TEST_MAIN})
|
|
|
|
endif(ENABLE_TESTING)
|