cmake: make re2 a mandatory dependency

This commit is contained in:
Corentin Le Molgat
2025-03-24 13:37:42 +01:00
parent 8dd492498f
commit 92b17b8fd2
3 changed files with 7 additions and 15 deletions

View File

@@ -62,12 +62,10 @@ if(NOT TARGET Eigen3::Eigen)
message(FATAL_ERROR "Target Eigen3::Eigen not available.")
endif()
if(BUILD_LP_PARSER OR BUILD_TESTING)
if(NOT TARGET re2::re2)
message(FATAL_ERROR "Target re2::re2 not available.")
endif()
set(RE2_DEPS re2::re2)
if(NOT TARGET re2::re2)
message(FATAL_ERROR "Target re2::re2 not available.")
endif()
set(RE2_DEPS re2::re2)
if(USE_COINOR)
if(NOT TARGET Coin::CbcSolver)

View File

@@ -38,10 +38,8 @@ if(NOT BUILD_Eigen3)
find_package(Eigen3 REQUIRED)
endif()
if(BUILD_LP_PARSER OR BUILD_TESTING)
if(NOT BUILD_re2)
find_package(re2 REQUIRED)
endif()
if(NOT BUILD_re2 AND NOT TARGET re2::re2)
find_package(re2 REQUIRED)
endif()
if(USE_COINOR)