diff --git a/CMakeLists.txt b/CMakeLists.txt index 307bf2620a..e0504cb518 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,11 +82,16 @@ include(CMakeDependentOption) CMAKE_DEPENDENT_OPTION(ALL_TESTS "Build all tests" OFF "BUILD_TESTING;BUILD_CXX" OFF) message(STATUS "Build all tests: ${ALL_TESTS}") -CMAKE_DEPENDENT_OPTION(BUILD_EXTRA_UNIT_TESTS "Build extra unit tests" OFF "BUILD_TESTING;BUILD_CXX;ALL_TESTS" OFF) +CMAKE_DEPENDENT_OPTION(BUILD_EXTRA_UNIT_TESTS "Build extra unit tests" OFF "ALL_TESTS" OFF) if (BUILD_EXTRA_UNIT_TESTS) message(STATUS "Build extra unit tests: ON") endif() +CMAKE_DEPENDENT_OPTION(BUILD_EXTRA_PROBLEM_SET "Build extra instance tests" OFF "BUILD_TESTING" OFF) +if (BUILD_EXTRA_PROBLEM_SET) + message(STATUS "Build extra instance tests: ON") +endif() + option(ZLIB "ZLIB" ON) message(STATUS "ZLIB: ${ZLIB}") if (PYTHON_BUILD_SETUP) diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 1da4017262..9aa5db34a4 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -86,14 +86,16 @@ if (NOT FAST_BUILD OR ALL_TESTS) set(TEST_SOURCES ${TEST_SOURCES} TestSpecialLps.cpp TestLpSolvers.cpp TestMipSolver.cpp) endif() - add_executable(unit_tests ${TEST_SOURCES}) + if (BUILD_EXTRA_UNIT_TESTS) + list(APPEND CMAKE_MODULE_PATH "${HIGHS_SOURCE_DIR}/check/highs-unit-tests") + message(STATUS "${HIGHS_SOURCE_DIR}/check/highs-unit-tests") + include(highs-unit-tests) - if (BUILD_EXTRA_UNIT_TESTS) - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/highs-unit-tests") - include(extra-tests) - message(STATUS "EXTRA TESTS: ${HIGHS_EXTRA_UNIT_TESTS}") - set(TEST_SOURCES ${HIGHS_EXTRA_UNIT_TESTS}) - endif() + set(TEST_SOURCES ${TEST_SOURCES} ${HIGHS_EXTRA_UNIT_TESTS}) + message(STATUS ${TEST_SOURCES}) + endif() + + add_executable(unit_tests ${TEST_SOURCES}) if (UNIX) target_compile_options(unit_tests PRIVATE "-Wno-unused-variable") @@ -331,3 +333,9 @@ if (NOT FAST_BUILD OR ALL_TESTS) endforeach() endif() + +if (BUILD_EXTRA_PROBLEM_SET) + list(APPEND CMAKE_MODULE_PATH "${HIGHS_SOURCE_DIR}/check/highs-problem-set") + message(STATUS "${HIGHS_SOURCE_DIR}/check/highs-problem-set") + include(highs-problem-set) +endif()