diff --git a/cmake/check_deps.cmake b/cmake/check_deps.cmake index 0b565d5b52..88bc8c4db2 100644 --- a/cmake/check_deps.cmake +++ b/cmake/check_deps.cmake @@ -117,8 +117,13 @@ if(USE_CPLEX AND NOT TARGET CPLEX::CPLEX) endif() # CXX Test -if(BUILD_TESTING AND NOT TARGET GTest::gtest_main) - message(FATAL_ERROR "Target GTest::gtest_main not available.") +if(BUILD_TESTING) + if(NOT TARGET GTest::gtest_main) + message(FATAL_ERROR "Target GTest::gtest_main not available.") + endif() + if(NOT TARGET benchmark::benchmark) + message(FATAL_ERROR "Target benchmark::benchmark not available.") + endif() endif() # Check language Dependencies diff --git a/cmake/docker/system_deps/Dockerfile b/cmake/docker/system_deps/Dockerfile index 82dc3ed664..99e1cb715b 100644 --- a/cmake/docker/system_deps/Dockerfile +++ b/cmake/docker/system_deps/Dockerfile @@ -12,7 +12,7 @@ RUN pacman -Syu --noconfirm \ coin-or-cbc coin-or-clp \ glpk \ scip \ - gtest + gtest benchmark ENTRYPOINT ["/bin/bash", "-c"] CMD [ "/bin/bash" ] diff --git a/cmake/system_deps.cmake b/cmake/system_deps.cmake index d9ae923c15..4dd0402b6f 100644 --- a/cmake/system_deps.cmake +++ b/cmake/system_deps.cmake @@ -92,6 +92,10 @@ if(BUILD_TESTING AND NOT BUILD_googletest) find_package(GTest REQUIRED) endif() +if(BUILD_TESTING AND NOT BUILD_benchmark) + find_package(benchmark REQUIRED) +endif() + # Check language Dependencies if(BUILD_PYTHON) if(NOT BUILD_pybind11)