From b74b14ab34f702e7dc949c605c1228ee7ca8b754 Mon Sep 17 00:00:00 2001 From: Jonathan Frey Date: Wed, 23 Apr 2025 18:54:31 +0200 Subject: [PATCH 1/2] CMake: set default HPIPM_TARGET to GENERIC, previously used X64_AUTOMATIC default, does actually not exist --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 17fc936b3e..f7e6bf8aaa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,8 +64,8 @@ if ("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "aarch64") else() set(BLASFEO_TARGET "X64_AUTOMATIC" CACHE STRING "BLASFEO Target architecture") endif() -set(HPIPM_TARGET "X64_AUTOMATIC" CACHE STRING "HPIPM Target architecture") set(LA "HIGH_PERFORMANCE" CACHE STRING "Linear algebra optimization level") +set(HPIPM_TARGET "GENERIC" CACHE STRING "HPIPM Target architecture") if (CMAKE_SYSTEM_NAME MATCHES "Windows") set(BUILD_SHARED_LIBS OFF CACHE STRING "Build shared libraries") From 4ace13c302f9315ed9b62ea93a079226abbc0465 Mon Sep 17 00:00:00 2001 From: Jonathan Frey Date: Wed, 23 Apr 2025 19:04:48 +0200 Subject: [PATCH 2/2] document cmake options --- docs/installation/index.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/installation/index.md b/docs/installation/index.md index fbcb942b2c..ca54cba5e6 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -24,12 +24,42 @@ Install `acados` as follows: mkdir -p build cd build cmake -DACADOS_WITH_QPOASES=ON .. -# add more optional arguments e.g. -DACADOS_WITH_OSQP=OFF/ON -DACADOS_INSTALL_DIR= above +# add more optional arguments e.g. -DACADOS_WITH_DAQP=ON, a list of CMake options is provided below make install -j4 ``` -NOTE: you can set the `BLASFEO_TARGET` in `/CMakeLists.txt`. -For a list of supported targets, we refer to https://github.com/giaf/blasfeo/blob/master/README.md . -The default is `X64_AUTOMATIC`, which attempts to determine the best available target for your machine. + +#### CMake options: +Below is a list of CMake options available for configuring the `acados` build. +These options can be passed to the `cmake` command using the `-D` flag, e.g., `cmake -DOPTION_NAME=VALUE ..`. +Adjust these options based on your requirements. + +| **Option Name** | **Description** | **Default Value** | +|--------------------------------|------------------------------------------------------------|-------------------| +| `ACADOS_WITH_QPOASES` | Compile acados with optional QP solver qpOASES | `OFF` | +| `ACADOS_WITH_DAQP` | Compile acados with optional QP solver DAQP | `OFF` | +| `ACADOS_WITH_QPDUNES` | Compile acados with optional QP solver qpDUNES | `OFF` | +| `ACADOS_WITH_OSQP` | Compile acados with optional QP solver OSQP | `OFF` | +| `ACADOS_WITH_HPMPC` | Compile acados with optional QP solver HPMPC | `OFF` | +| `ACADOS_WITH_QORE` | Compile acados with optional QP solver QORE (experimental) | `OFF` | +| `ACADOS_WITH_OOQP` | Compile acados with optional QP solver OOQP (experimental) | `OFF` | +| `BLASFEO_TARGET` | BLASFEO Target architecture, see BLASFEO repository for more information. Possible values include: `X64_AUTOMATIC`, `GENERIC`, `X64_INTEL_SKYLAKE_X`, `X64_INTEL_HASWELL`, `X64_INTEL_SANDY_BRIDGE`, `X64_INTEL_CORE`, `X64_AMD_BULLDOZER`, `ARMV8A_APPLE_M1`, `ARMV8A_ARM_CORTEX_A76`, `ARMV8A_ARM_CORTEX_A73`, `ARMV8A_ARM_CORTEX_A57`, `ARMV8A_ARM_CORTEX_A55`, `ARMV8A_ARM_CORTEX_A53`, `ARMV7A_ARM_CORTEX_A15`, `ARMV7A_ARM_CORTEX_A9`, `ARMV7A_ARM_CORTEX_A7` | `X64_AUTOMATIC` | +| `LA` | Linear algebra optimization level for BLASFEO | `HIGH_PERFORMANCE`| +| `ACADOS_WITH_SYSTEM_BLASFEO` | Use BLASFEO found via `find_package(blasfeo)` instead of compiling it | `OFF` | +| `HPIPM_TARGET` | HPIPM Target architecture. Possible values: `AVX`, `GENERIC` | `GENERIC` | +| `ACADOS_WITH_OPENMP` | OpenMP parallelization | `OFF` | +| `ACADOS_NUM_THREADS` | Number of threads for OpenMP parallelization within one NLP solver. If not set, `omp_get_max_threads` will be used to determine the number of threads. If multiple solves should be parallelized, e.g. with an `AcadosOcpBatchSolver` or `AcadosSimBatchSolver`, set this to 1. | Not set | +| `ACADOS_SILENT` | No console status output | `OFF` | +| `ACADOS_DEBUG_SQP_PRINT_QPS_TO_FILE` | Print QP inputs and outputs to file in SQP | `OFF` | +| `CMAKE_BUILD_TYPE` | Build type (e.g., Release, Debug, etc.) | `Release` | +| `ACADOS_UNIT_TESTS` | Compile unit tests | `OFF` | +| `ACADOS_EXAMPLES` | Compile C examples | `OFF` | +| `ACADOS_OCTAVE` | Octave interface CMake tests | `OFF` | +| `ACADOS_PYTHON` | Python interface CMake tests (Note: Python interface installation is independent of this) | `OFF` | +| `BUILD_SHARED_LIBS` | Build shared libraries | `ON` (non-Windows)| + + + +For more details on specific options, refer to the comments in the `CMakeLists.txt` file. #### **Make** (not recommended) NOTE: This build system is not actively tested and might be removed in the future! It is strongly recommended to use the `CMake` build system.