2023-07-17 20:51:15 +00:00
|
|
|
if(ENABLE_TESTING)
|
2023-10-06 17:32:29 +00:00
|
|
|
set(TEST_BAYESNET "unit_tests_bayesnet")
|
2024-01-07 18:58:22 +00:00
|
|
|
include_directories(
|
|
|
|
${BayesNet_SOURCE_DIR}/lib/Files
|
|
|
|
${BayesNet_SOURCE_DIR}/lib/mdlp
|
|
|
|
${BayesNet_SOURCE_DIR}/lib/folding
|
|
|
|
${BayesNet_SOURCE_DIR}/lib/json/include
|
2024-03-08 21:20:54 +00:00
|
|
|
${BayesNet_SOURCE_DIR}
|
2024-03-09 11:27:05 +00:00
|
|
|
${CMAKE_BINARY_DIR}/configured_files/include/bayesnet
|
2024-01-07 18:58:22 +00:00
|
|
|
)
|
2024-03-08 21:20:54 +00:00
|
|
|
file(GLOB_RECURSE BayesNet_SOURCES "${BayesNet_SOURCE_DIR}/bayesnet/*.cc")
|
2024-01-07 18:58:22 +00:00
|
|
|
set(TEST_SOURCES_BAYESNET TestBayesModels.cc TestBayesNetwork.cc TestBayesMetrics.cc TestUtils.cc ${BayesNet_SOURCES})
|
2023-10-06 17:32:29 +00:00
|
|
|
add_executable(${TEST_BAYESNET} ${TEST_SOURCES_BAYESNET})
|
2024-02-23 19:36:11 +00:00
|
|
|
target_link_libraries(${TEST_BAYESNET} PUBLIC "${TORCH_LIBRARIES}" ArffFiles mdlp Catch2::Catch2WithMain )
|
2023-10-06 17:32:29 +00:00
|
|
|
add_test(NAME ${TEST_BAYESNET} COMMAND ${TEST_BAYESNET})
|
2023-07-17 20:51:15 +00:00
|
|
|
endif(ENABLE_TESTING)
|