Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gersemirc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
definitions: [./CMakeLists.txt, ./benchmark, ./bindings, ./cmake, ./tests]
line_length: 80
indent: 2
warn_about_unknown_commands: false
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ci:
autoupdate_branch: main
autofix_prs: false
submodules: true
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ include("${JRL_CMAKE_MODULES}/base.cmake")
include("${JRL_CMAKE_MODULES}/boost.cmake")

# Project definition
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
project(${PROJECT_NAME} ${PROJECT_ARGS})

add_compile_options(-Wno-error)
Expand All @@ -93,11 +93,11 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
endif()

find_package(example-robot-data 4.0.9 REQUIRED)
add_project_dependency(OpenMP REQUIRED)
add_project_dependency(proxsuite REQUIRED)
add_project_dependency(pinocchio REQUIRED)
add_project_dependency(aligator REQUIRED)
add_project_dependency(ndcurves REQUIRED)
ADD_PROJECT_DEPENDENCY(OpenMP REQUIRED)
ADD_PROJECT_DEPENDENCY(proxsuite REQUIRED)
ADD_PROJECT_DEPENDENCY(pinocchio REQUIRED)
ADD_PROJECT_DEPENDENCY(aligator REQUIRED)
ADD_PROJECT_DEPENDENCY(ndcurves REQUIRED)

# Main Library
file(GLOB mpc_SOURCE CONFIGURE_DEPENDS src/*.cpp)
Expand Down
13 changes: 8 additions & 5 deletions bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include("${JRL_CMAKE_MODULES}/python.cmake")
include("${JRL_CMAKE_MODULES}/stubs.cmake")

add_project_dependency(eigenpy 3.9.1 REQUIRED)
ADD_PROJECT_DEPENDENCY(eigenpy 3.9.1 REQUIRED)

set(
${PY_NAME}_SOURCES
Expand All @@ -28,12 +28,15 @@ install(TARGETS ${PY_NAME}_pywrap DESTINATION ${${PY_NAME}_INSTALL_DIR})
set(${PY_NAME}_PYTHON __init__.py)

foreach(python ${${PY_NAME}_PYTHON})
python_install_on_site(${PY_NAME} ${python})
PYTHON_INSTALL_ON_SITE(${PY_NAME} ${python})
endforeach()

if(GENERATE_PYTHON_STUBS)
load_stubgen()
generate_stubs(${CMAKE_CURRENT_BINARY_DIR} simple_mpc ${PYTHON_SITELIB}
${PY_NAME}_pywrap
LOAD_STUBGEN()
GENERATE_STUBS(
${CMAKE_CURRENT_BINARY_DIR}
simple_mpc
${PYTHON_SITELIB}
${PY_NAME}_pywrap
)
endif()
6 changes: 3 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ function(_add_test_prototype name prefix dependencies)
set(test_file ${name}.cpp)
message(STATUS "Adding C++ test: ${test_file} (${test_name})")

add_unit_test(${test_name} ${test_file} ${TEST_HEADERS})
ADD_UNIT_TEST(${test_name} ${test_file} ${TEST_HEADERS})
set_target_properties(${test_name} PROPERTIES LINKER_LANGUAGE CXX)
# set_standard_output_directory(${test_name})
target_include_directories(${test_name} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

set(MODULE_NAME "${name}Test")
string(REGEX REPLACE "-" "_" MODULE_NAME ${MODULE_NAME})

add_test_cflags(${test_name} "-DBOOST_TEST_DYN_LINK")
add_test_cflags(${test_name} "-DBOOST_TEST_MODULE=${MODULE_NAME}")
ADD_TEST_CFLAGS(${test_name} "-DBOOST_TEST_DYN_LINK")
ADD_TEST_CFLAGS(${test_name} "-DBOOST_TEST_MODULE=${MODULE_NAME}")

target_link_libraries(${test_name} PUBLIC ${dependencies})
target_link_libraries(${test_name} PRIVATE Boost::unit_test_framework)
Expand Down