From f917f8db0322579aa201a8f324638bf5bd6bf3a8 Mon Sep 17 00:00:00 2001 From: Peter Mitri Date: Thu, 21 Nov 2024 14:11:39 +0100 Subject: [PATCH] link to tbb --- .github/workflows/build_ubuntu.yml | 2 +- CMakeLists.txt | 3 ++- src/cpp/benders/benders_core/CMakeLists.txt | 1 + src/cpp/exe/full_run/CMakeLists.txt | 1 + src/cpp/lpnamer/problem_modifier/CMakeLists.txt | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_ubuntu.yml b/.github/workflows/build_ubuntu.yml index 60860825b..0c7dbf26d 100644 --- a/.github/workflows/build_ubuntu.yml +++ b/.github/workflows/build_ubuntu.yml @@ -25,7 +25,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]')" strategy: matrix: - os: [ ubuntu-22.04 ] + os: [ ubuntu-20.04 ] env: VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/vcpkg_cache,readwrite" ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools diff --git a/CMakeLists.txt b/CMakeLists.txt index 800819773..95ec8c575 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -130,7 +130,7 @@ if (${BUILD_antares_solver}) #check if antares_solver available before asking for sirius and ortools build find_package(Antares QUIET) if (NOT Antares_FOUND) - message(WARNING "Antares solver not found, will be build") + message(WARNING "Antares solver not found, will be built") set(BUILD_sirius ON) set(BUILD_ortools ON) if (NOT Antares_FOUND) @@ -206,6 +206,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux) set(THREADS_PREFER_PTHREAD_FLAG ON) endif () find_package(Threads REQUIRED) +find_package(TBB REQUIRED COMPONENTS tbb) find_package(ZLIB REQUIRED) #Required for CoinUtils diff --git a/src/cpp/benders/benders_core/CMakeLists.txt b/src/cpp/benders/benders_core/CMakeLists.txt index 0e5dd396a..eba173931 100644 --- a/src/cpp/benders/benders_core/CMakeLists.txt +++ b/src/cpp/benders/benders_core/CMakeLists.txt @@ -60,6 +60,7 @@ target_link_libraries(benders_core antaresXpansion::solvers ${JSONCPP_LIB} antaresXpansion::outer_loop_lib + TBB::tbb ) install(DIRECTORY include/antares-xpansion diff --git a/src/cpp/exe/full_run/CMakeLists.txt b/src/cpp/exe/full_run/CMakeLists.txt index abf8fd414..21d57bfd2 100644 --- a/src/cpp/exe/full_run/CMakeLists.txt +++ b/src/cpp/exe/full_run/CMakeLists.txt @@ -32,6 +32,7 @@ target_link_libraries(full_run ${PROJECT_NAME}::benders_sequential_core ${PROJECT_NAME}::xpansion_study_updater_lib antaresXpansion::helpers + TBB::tbb ) install(TARGETS full_run DESTINATION bin) \ No newline at end of file diff --git a/src/cpp/lpnamer/problem_modifier/CMakeLists.txt b/src/cpp/lpnamer/problem_modifier/CMakeLists.txt index ed71da2d2..90ca815af 100644 --- a/src/cpp/lpnamer/problem_modifier/CMakeLists.txt +++ b/src/cpp/lpnamer/problem_modifier/CMakeLists.txt @@ -63,6 +63,7 @@ target_link_libraries(lp_namer_problem_modifier antaresXpansion::helpers antaresXpansion::solvers Antares::antares-solver-simulation + TBB::tbb ) add_library(${PROJECT_NAME}::lp_namer_problem_modifier ALIAS lp_namer_problem_modifier)