Permalink
Browse files

Rewrite the installation system of acados

  • Loading branch information...
roversch committed Oct 19, 2017
1 parent 6bbf01b commit 1b9cbe2c0e55b028a41eeb797845c2ea05b09c4e
View
@@ -1,11 +1,13 @@
[submodule "hpmpc"]
path = external/hpmpc
url = https://github.com/giaf/hpmpc.git
branch = stable
[submodule "blasfeo"]
path = external/blasfeo
url = https://github.com/giaf/blasfeo.git
branch = stable
[submodule "qpdunes"]
path = external/qpDUNES-dev
path = external/qpdunes
url = https://github.com/acados/qpDUNES-dev.git
[submodule "catch"]
path = external/catch
@@ -18,3 +20,4 @@
[submodule "hpipm"]
path = external/hpipm
url = https://github.com/giaf/hpipm.git
branch = acados_stable
View
@@ -12,8 +12,6 @@ set(BUILD_SHARED_LIBS ON CACHE INTERNAL "Build shared libraries")
# acados specific options
set(ACADOS_INSTALL_DIR "$ENV{HOME}/local" CACHE PATH "acados installation folder")
set(ACADOS_MEASURE_TIMINGS ON CACHE BOOL "Measure the solution time of various algorithms")
set(SWIG_PYTHON ON CACHE BOOL "Build the Python interface")
set(SWIG_MATLAB OFF CACHE BOOL "Build the MATLAB interface")
View
@@ -19,6 +19,8 @@
set(PACKAGE_SO_VERSION "0.1")
include(CMakePackageConfigHelpers)
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
set(ACADOS_WITH_HPMPC OFF)
else()
@@ -39,28 +41,12 @@ endif()
# Define acados library
add_library(acados ${ACADOS_SRC})
target_include_directories(acados
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}> # for include "acados/..."
$<BUILD_INTERFACE:${EXTERNAL_SRC_DIR}/blasfeo/include>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}> # to be able to include "acados/header.h"
$<BUILD_INTERFACE:${EXTERNAL_SRC_DIR}>
$<INSTALL_INTERFACE:include>)
install(TARGETS acados EXPORT acadosConfig
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../acados
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN "simplified" EXCLUDE)
# install(EXPORT acadosConfig DESTINATION share)
# set_target_properties(acados
# PROPERTIES
# SOVERSION ${PACKAGE_SO_VERSION})
# export(TARGETS acados FILE ${PROJECT_BINARY_DIR}/acadosConfig.cmake)
# HPMPC must come before BLASFEO!
if(ACADOS_WITH_HPMPC)
@@ -82,7 +68,7 @@ if(ACADOS_WITH_OOQP)
endif()
# Enable or disable timings
if(ACADOS_MEASURE_TIMINGS)
if(NOT ACADOS_NO_TIMINGS)
target_compile_definitions(acados PUBLIC MEASURE_TIMINGS)
endif()
@@ -97,3 +83,26 @@ endif()
target_compile_definitions(acados PRIVATE ALIGNMENT=64)
target_compile_definitions(acados PRIVATE USE_ACADOS_TYPES) # Needed for qpDUNES
install(TARGETS acados EXPORT acadosTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../acados
DESTINATION include
FILES_MATCHING PATTERN "*.h"
PATTERN "simplified" EXCLUDE)
install(EXPORT acadosTargets DESTINATION cmake)
configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/acadosConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/acadosConfig.cmake
INSTALL_DESTINATION cmake)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/acadosConfig.cmake
DESTINATION cmake)
# set_target_properties(acados
# PROPERTIES SOVERSION ${PACKAGE_SO_VERSION})
# export(TARGETS acados FILE ${PROJECT_BINARY_DIR}/acadosConfig.cmake)
@@ -26,7 +26,7 @@ extern "C" {
#include <stdbool.h>
#include "qpDUNES-dev/include/qpDUNES.h"
#include "qpDUNES.h"
#include "acados/ocp_qp/ocp_qp_common.h"
#include "acados/utils/types.h"
View
@@ -22,6 +22,10 @@
#include "acados/utils/types.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef MEASURE_TIMINGS
#if (defined _WIN32 || defined _WIN64) && !(defined __MINGW32__ || defined __MINGW64__)
@@ -87,4 +91,8 @@ void acados_tic(acados_timer* t);
/** A function which returns the elapsed time. */
real_t acados_toc(acados_timer* t);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif // ACADOS_UTILS_TIMING_H_
@@ -0,0 +1,19 @@
list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_LIST_DIR}/../") # for *Config.cmake
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") # for FindOpenBLAS, FindFortranLibs
find_package(blasfeo)
find_package(hpipm)
find_package(hpmpc)
find_package(qpdunes)
find_package(qpOASES_e)
find_package(ooqp)
find_package(OpenBLAS)
add_library(openblas UNKNOWN IMPORTED)
set_property(TARGET openblas PROPERTY IMPORTED_LOCATION ${OpenBLAS_LIB})
find_package(FortranLibs)
add_library(gfortran UNKNOWN IMPORTED)
set_property(TARGET gfortran PROPERTY IMPORTED_LOCATION ${FORTRAN_LIBRARY})
include("${CMAKE_CURRENT_LIST_DIR}/acadosTargets.cmake")
@@ -25,3 +25,4 @@ ExternalProject_Add_Step(ma27_project rename_library
add_library(ma27 STATIC IMPORTED GLOBAL)
add_dependencies(ma27 ma27_project)
set_property(TARGET ma27 PROPERTY IMPORTED_LOCATION "${PROJECT_BINARY_DIR}/external/ma27/lib/libma27.a")
install(FILES "${PROJECT_BINARY_DIR}/external/ma27/lib/libma27.a" DESTINATION lib)
View
@@ -68,6 +68,18 @@ set_property(TARGET ooqp
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/external/OOQP/include>
$<INSTALL_INTERFACE:include>)
install(TARGETS ooqp EXPORT ooqpConfig
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)
install(EXPORT ooqpConfig DESTINATION cmake)
install(FILES
${CMAKE_CURRENT_LIST_DIR}/../FindFortranLibs.cmake
${CMAKE_CURRENT_LIST_DIR}/../FindOpenBLAS.cmake
DESTINATION cmake)
install(DIRECTORY ${BINARY_DIR}/include/
DESTINATION include/ooqp
FILES_MATCHING PATTERN "*.h")
View
@@ -23,13 +23,16 @@ if(CMAKE_SYSTEM_NAME MATCHES "dSpace")
endif()
set(TARGET "GENERIC" CACHE STRING "Target architecture")
set(LA "HIGH_PERFORMANCE" CACHE STRING "Linear algebra optimization level")
set(BLASFEO_HEADERS_INSTALLATION_DIRECTORY "include/blasfeo/include" CACHE STRING "")
set(HPIPM_HEADERS_INSTALLATION_DIRECTORY "include/hpipm/include" CACHE STRING "")
set(HPMPC_HEADERS_INSTALLATION_DIRECTORY "include/hpmpc/include" CACHE STRING "")
add_subdirectory(blasfeo)
add_subdirectory(hpipm)
if((NOT CMAKE_C_COMPILER_ID MATCHES "MSVC") AND (NOT CMAKE_SYSTEM_NAME MATCHES "dSpace"))
add_subdirectory(hpmpc)
endif()
add_subdirectory(qpDUNES-dev)
add_subdirectory(qpdunes)
add_subdirectory(qpOASES)
if (ACADOS_WITH_OOQP)
include(external/ooqp)
Submodule blasfeo updated 1 files
+5 −1 CMakeLists.txt
Submodule hpipm updated 47 files
+14 −1 CMakeLists.txt
+7 −1 include/hpipm_d_cond.h
+7 −1 include/hpipm_d_cond_aux.h
+7 −1 include/hpipm_d_core_qp_ipm.h
+8 −0 include/hpipm_d_core_qp_ipm_aux.h
+6 −1 include/hpipm_d_dense_qp.h
+7 −1 include/hpipm_d_dense_qp_ipm.h
+7 −1 include/hpipm_d_dense_qp_kkt.h
+7 −1 include/hpipm_d_dense_qp_sol.h
+7 −1 include/hpipm_d_erk_int.h
+6 −1 include/hpipm_d_irk_int.h
+7 −1 include/hpipm_d_ocp_nlp.h
+7 −1 include/hpipm_d_ocp_nlp_aux.h
+7 −1 include/hpipm_d_ocp_nlp_hyb.h
+6 −1 include/hpipm_d_ocp_nlp_ipm.h
+7 −1 include/hpipm_d_ocp_nlp_sol.h
+7 −1 include/hpipm_d_ocp_nlp_sqp.h
+7 −1 include/hpipm_d_ocp_qp_kkt.h
+7 −1 include/hpipm_d_part_cond.h
+6 −2 include/hpipm_d_rk_int.h
+7 −1 include/hpipm_d_tree_ocp_qp.h
+7 −1 include/hpipm_d_tree_ocp_qp_ipm.h
+6 −1 include/hpipm_d_tree_ocp_qp_kkt.h
+7 −1 include/hpipm_d_tree_ocp_qp_sol.h
+7 −1 include/hpipm_m_ocp_qp.h
+6 −1 include/hpipm_m_ocp_qp_ipm_hard.h
+8 −0 include/hpipm_m_ocp_qp_kkt.h
+6 −1 include/hpipm_s_cond.h
+6 −1 include/hpipm_s_cond_aux.h
+6 −1 include/hpipm_s_core_qp_ipm.h
+7 −0 include/hpipm_s_core_qp_ipm_aux.h
+6 −1 include/hpipm_s_dense_qp.h
+6 −1 include/hpipm_s_dense_qp_ipm.h
+6 −1 include/hpipm_s_dense_qp_kkt.h
+7 −1 include/hpipm_s_dense_qp_sol.h
+7 −1 include/hpipm_s_ocp_nlp_sol.h
+7 −1 include/hpipm_s_ocp_qp.h
+6 −1 include/hpipm_s_ocp_qp_ipm.h
+6 −1 include/hpipm_s_ocp_qp_kkt.h
+7 −1 include/hpipm_s_ocp_qp_sol.h
+6 −1 include/hpipm_s_part_cond.h
+6 −1 include/hpipm_s_tree_ocp_qp.h
+6 −1 include/hpipm_s_tree_ocp_qp_ipm.h
+7 −1 include/hpipm_s_tree_ocp_qp_kkt.h
+7 −1 include/hpipm_s_tree_ocp_qp_sol.h
+1 −1 include/hpipm_scenario_tree.h
+1 −1 include/hpipm_tree.h
Submodule hpmpc updated 1 files
+13 −0 CMakeLists.txt
Submodule qpDUNES-dev deleted from 1644a4
@@ -96,7 +96,7 @@ install(TARGETS qpOASES_e EXPORT qpOASES_eConfig
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION lib)
install(EXPORT qpOASES_eConfig DESTINATION share)
install(EXPORT qpOASES_eConfig DESTINATION cmake)
set_target_properties(
qpOASES_e
PROPERTIES
Submodule qpdunes added at d2e395

0 comments on commit 1b9cbe2

Please sign in to comment.