From 266b8aa323b1c555924a759832688613b459146d Mon Sep 17 00:00:00 2001 From: Pieter Pas Date: Mon, 11 Dec 2023 13:53:31 +0100 Subject: [PATCH] Add ALPAQA_WITH_GRADIENT_CHECKER option --- .github/workflows/linux.yml | 2 ++ CMakeLists.txt | 2 ++ conanfile.py | 1 + src/CMakeLists.txt | 4 +++- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 485b34d4d4..4c33a25497 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -68,6 +68,8 @@ jobs: -D ALPAQA_WITH_IPOPT=On \ -D ALPAQA_WITH_CUTEST=On \ -D ALPAQA_WITH_CUTEST_EXAMPLES=Off \ + -D ALPAQA_WITH_DRIVERS=On \ + -D ALPAQA_WITH_GRADIENT_CHECKER=On \ -D CMAKE_TOOLCHAIN_FILE="$staging/$host.toolchain.cmake" \ -D CMAKE_PREFIX_PATH="$staging/mumps/usr/local;$staging/ipopt/usr/local" \ -D CMAKE_FIND_ROOT_PATH="$staging/eigen;$staging/casadi;$staging/openblas;$staging/mumps;$staging/ipopt" diff --git a/CMakeLists.txt b/CMakeLists.txt index aa8564baee..757f3f9219 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,8 @@ option(ALPAQA_WITH_EXAMPLES "Build the examples" On) option(ALPAQA_WITH_DRIVERS "Build the solver driver programs" On) +option(ALPAQA_WITH_GRADIENT_CHECKER + "Build the solver driver programs" Off) option(ALPAQA_WITH_OCP "Enable solvers tailored for optimal control problems" On) cmake_dependent_option(ALPAQA_WITH_CASADI_OCP diff --git a/conanfile.py b/conanfile.py index db6f793cdd..c66b0fa695 100644 --- a/conanfile.py +++ b/conanfile.py @@ -25,6 +25,7 @@ class AlpaqaRecipe(ConanFile): "with_python": False, "with_matlab": False, "with_drivers": True, + "with_gradient_checker": False, "with_casadi": False, "with_cutest": False, "with_qpalm": False, diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24ddecd5ea..81ef07bfd3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -406,8 +406,10 @@ if (ALPAQA_WITH_DRIVERS) if (TARGET alpaqa::qpalm-adapter) target_link_libraries(driver PRIVATE alpaqa::qpalm-adapter) endif() +endif() - # Gradient checker tool +# Gradient checker tool +if (ALPAQA_WITH_GRADIENT_CHECKER) add_executable(gradient-checker "alpaqa/src/driver/gradient-checker.cpp" "alpaqa/src/driver/problem.cpp"