Skip to content

Commit

Permalink
Test for precompiled headers
Browse files Browse the repository at this point in the history
- Eigen/Dense
- pinocchio/algorithm
- pinocchio/multibody
  • Loading branch information
ManifoldFR committed Jan 3, 2025
1 parent b4a788c commit b11bfa6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,17 @@ function(create_library)
if(BUILD_WITH_OPENMP_SUPPORT)
target_link_libraries(${PROJECT_NAME} PUBLIC OpenMP::OpenMP_CXX)
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC proxsuite-nlp::proxsuite-nlp)
target_link_libraries(${PROJECT_NAME} PUBLIC fmt::fmt)
target_link_libraries(
${PROJECT_NAME}
PUBLIC proxsuite-nlp::proxsuite-nlp fmt::fmt
)
target_precompile_headers(
${PROJECT_NAME}
PRIVATE
<Eigen/Dense>
include/aligator/pinocchio-algorithm.pch.h
include/aligator/pinocchio-multibody.pch.h
)
# set the install-tree include dirs
# used by dependent projects to consume this target
target_include_directories(
Expand Down
10 changes: 4 additions & 6 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,14 @@ function(make_bindings)
# deprecated functions are exposed up until they are removed. remove warnings.
target_compile_options(${PYLIB_NAME} PRIVATE "-Wno-deprecated-declarations")
target_compile_definitions(${PYLIB_NAME} PRIVATE MODULE_NAME=${PYLIB_NAME})
target_include_directories(
${PYLIB_NAME}
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)

target_link_libraries(${PYLIB_NAME} PUBLIC ${PROJECT_NAME} eigenpy::eigenpy)
target_include_directories(
${PYLIB_NAME}
PUBLIC $<TARGET_PROPERTY:proxsuite-nlp::pyproxsuite_nlp,INCLUDE_DIRECTORIES>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<TARGET_PROPERTY:proxsuite-nlp::pyproxsuite_nlp,INCLUDE_DIRECTORIES>
)
target_precompile_headers(${PYLIB_NAME} REUSE_FROM ${PROJECT_NAME})

if(BUILD_CROCODDYL_COMPAT)
target_link_libraries(${PYLIB_NAME} PUBLIC aligator::croc_compat)
Expand Down
22 changes: 22 additions & 0 deletions include/aligator/pinocchio-algorithm.pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include <pinocchio/algorithm/aba.hpp>
#include <pinocchio/algorithm/aba-derivatives.hpp>

#include <pinocchio/algorithm/center-of-mass.hpp>
#include <pinocchio/algorithm/center-of-mass-derivatives.hpp>

#include <pinocchio/algorithm/centroidal.hpp>
#include <pinocchio/algorithm/centroidal-derivatives.hpp>

#include <pinocchio/algorithm/constrained-dynamics.hpp>
#include <pinocchio/algorithm/constrained-dynamics-derivatives.hpp>
#include <pinocchio/algorithm/contact-jacobian.hpp>

#include <pinocchio/algorithm/frames.hpp>
#include <pinocchio/algorithm/frames-derivatives.hpp>

#include <pinocchio/algorithm/joint-configuration.hpp>

#include <pinocchio/algorithm/rnea.hpp>
#include <pinocchio/algorithm/rnea-derivatives.hpp>
5 changes: 5 additions & 0 deletions include/aligator/pinocchio-multibody.pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#include <pinocchio/multibody/data.hpp>
#include <pinocchio/multibody/model.hpp>
#include <pinocchio/multibody/geometry.hpp>

0 comments on commit b11bfa6

Please sign in to comment.