Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile issues on Ubuntu 22 #967

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -206,6 +206,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux)
set(THREADS_PREFER_PTHREAD_FLAG ON)
endif ()
find_package(Threads REQUIRED)
find_package(TBB COMPONENTS tbb) # required for ubuntu 22+

find_package(ZLIB REQUIRED) #Required for CoinUtils

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/benders/benders_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ target_link_libraries(benders_core
antaresXpansion::outer_loop_lib
)

if (TBB_FOUND)
target_link_libraries(benders_core PRIVATE tbb)
endif ()

install(DIRECTORY include/antares-xpansion
DESTINATION "include"
)
4 changes: 4 additions & 0 deletions src/cpp/exe/full_run/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ target_link_libraries(full_run
antaresXpansion::helpers
)

if (TBB_FOUND)
target_link_libraries(full_run PRIVATE tbb)
endif ()

install(TARGETS full_run DESTINATION bin)
4 changes: 4 additions & 0 deletions src/cpp/lpnamer/problem_modifier/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ target_link_libraries(lp_namer_problem_modifier
Antares::antares-solver-simulation
)

if (TBB_FOUND)
target_link_libraries(lp_namer_problem_modifier PRIVATE tbb)
endif ()

add_library(${PROJECT_NAME}::lp_namer_problem_modifier ALIAS lp_namer_problem_modifier)

install(DIRECTORY include/antares-xpansion
Expand Down
Loading
Loading