cmake_minimum_required(VERSION 3.14)

# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 17)

include(FetchContent)
FetchContent_Declare(
  googletest
  GIT_REPOSITORY https://github.com/google/googletest.git
  GIT_TAG release-1.12.1
)
FetchContent_MakeAvailable(googletest)

add_executable(tests generators.cpp
  mdlcalculator_positive_integer_test.cpp mdlcalculator_integer_test.cpp mdlcalculator_real_test.cpp
  mdlcalculator_uniform_test.cpp mdlcalculator_binomial_test.cpp
  mdlcalculator_prequential_test.cpp valuesetrule_test.cpp modificationrule_test.cpp
  rulemodel_test.cpp condition_test.cpp logvariable_test.cpp
  modelencoder_test.cpp conditionmatcher_test.cpp rulefinder_test.cpp
  updaterulematcher_test.cpp distributionestimator_test.cpp
  histogram_test.cpp columncollector_test.cpp dataencoder_test.cpp
  serialobjectconverter_test.cpp cycledetector_test.cpp
  datagenerator_test.cpp modelfinder_test.cpp mlpack_test.cpp treeconditiongenerator_test.cpp
  statistics_test.cpp accuracyestimator_test.cpp quantilehistogramestimator_test.cpp
  dataencodingestimator_test.cpp applicabilityfinder_test.cpp)
target_link_libraries(tests GTest::gtest_main GTest::gmock_main classes)
add_dependencies(tests RunGenerator)

include(GoogleTest)
gtest_discover_tests(tests)
