Skip to content

Commit

Permalink
cmake: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 4, 2023
1 parent 2f04afb commit 9a1313b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ endif()

include(CMakeDependentOption)

# Optional components (enabled by default)
## Flatzinc
CMAKE_DEPENDENT_OPTION(BUILD_FLATZINC "Build flatzinc" ON "BUILD_CXX" OFF)
message(STATUS "Build Flatzinc: ${BUILD_FLATZINC}")

## LP Parser
CMAKE_DEPENDENT_OPTION(BUILD_LP_PARSER "Build lp_parser" ON "BUILD_CXX" OFF)
message(STATUS "Build LP Parser: ${BUILD_LP_PARSER}")

Expand All @@ -128,6 +131,7 @@ message(STATUS "Build MathOpt: ${BUILD_MATH_OPT}")
CMAKE_DEPENDENT_OPTION(BUILD_GLOP "Build GLOP standalone" ON "NOT BUILD_CXX" OFF)
message(STATUS "Build standalone Glop: ${BUILD_GLOP}")

## Samples
option(BUILD_SAMPLES "Build samples" ON)
message(STATUS "Build samples: ${BUILD_SAMPLES}")
CMAKE_DEPENDENT_OPTION(BUILD_CXX_SAMPLES "Build cxx samples" ON "BUILD_SAMPLES;BUILD_CXX" OFF)
Expand All @@ -139,6 +143,7 @@ message(STATUS "Build Java samples: ${BUILD_JAVA_SAMPLES}")
CMAKE_DEPENDENT_OPTION(BUILD_DOTNET_SAMPLES "Build dotnet samples" ON "BUILD_SAMPLES;BUILD_DOTNET" OFF)
message(STATUS "Build .Net samples: ${BUILD_DOTNET_SAMPLES}")

## Examples
option(BUILD_EXAMPLES "Build examples" ON)
message(STATUS "Build examples: ${BUILD_EXAMPLES}")
CMAKE_DEPENDENT_OPTION(BUILD_CXX_EXAMPLES "Build cxx examples" ON "BUILD_EXAMPLES;BUILD_CXX" OFF)
Expand Down Expand Up @@ -255,6 +260,7 @@ if(USE_PDLP)
endif()

## SCIP
# see: https://github.com/scipopt/scip
CMAKE_DEPENDENT_OPTION(USE_SCIP "Use the Scip solver" ON "BUILD_CXX" OFF)
message(STATUS "SCIP support: ${USE_SCIP}")
if(USE_SCIP)
Expand Down
3 changes: 3 additions & 0 deletions cmake/cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ list(APPEND OR_TOOLS_COMPILE_DEFINITIONS
"USE_BOP" # enable BOP support
"USE_GLOP" # enable GLOP support
)
# Optional Components
if(BUILD_LP_PARSER)
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_LP_PARSER")
endif()
if(BUILD_MATH_OPT)
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_MATH_OPT")
set(MATH_OPT_DIR math_opt)
endif()

# Optional solvers
if(USE_COINOR)
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS
"USE_CBC" # enable COIN-OR CBC support
Expand Down

0 comments on commit 9a1313b

Please sign in to comment.