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
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: [ubuntu] # TODO
os: [ubuntu]
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: update-flake-lock

on:
workflow_dispatch:
schedule:
- cron: '0 16 13 * *'

jobs:
update-flake-inputs:
runs-on: ubuntu-slim
Expand Down
77 changes: 37 additions & 40 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,40 @@
ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.5
hooks:
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
- id: ruff-format
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.3
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.0
hooks:
- id: clang-format
args:
- --style=Google
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.26.1
hooks:
- id: gersemi
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.9
hooks:
- id: ruff-check
- id: ruff-format
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.4
hooks:
- id: toml-sort-fix
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.2
hooks:
- id: clang-format
args:
- --style=Google
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
76 changes: 40 additions & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,32 @@ set(PROJECT_USE_CMAKE_EXPORT TRUE)
# Check if the submodule cmake have been initialized
set(JRL_CMAKE_MODULES "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(EXISTS "${JRL_CMAKE_MODULES}/base.cmake")
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
message(STATUS "JRL cmakemodules found in 'cmake/' git submodule")
else()
find_package(jrl-cmakemodules QUIET CONFIG)
if(jrl-cmakemodules_FOUND)
get_property(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}")
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git")
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties("jrl-cmakemodules" SOURCE_DIR JRL_CMAKE_MODULES)
endif()
find_package(jrl-cmakemodules QUIET CONFIG)
if(jrl-cmakemodules_FOUND)
get_property(
JRL_CMAKE_MODULES
TARGET jrl-cmakemodules::jrl-cmakemodules
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)
message(
STATUS
"JRL cmakemodules found on system at ${JRL_CMAKE_MODULES}"
)
else()
message(STATUS "JRL cmakemodules not found. Let's fetch it.")
include(FetchContent)
FetchContent_Declare(
"jrl-cmakemodules"
GIT_REPOSITORY "https://github.com/jrl-umi3218/jrl-cmakemodules.git"
)
FetchContent_MakeAvailable("jrl-cmakemodules")
FetchContent_GetProperties(
"jrl-cmakemodules"
SOURCE_DIR JRL_CMAKE_MODULES
)
endif()
endif()

include("${JRL_CMAKE_MODULES}/hpp.cmake")
Expand All @@ -56,27 +64,25 @@ check_minimal_cxx_standard(11 REQUIRED)

# Handle APPLE Cmake policy
if(APPLE)
apply_default_apple_configuration()
apply_default_apple_configuration()
endif(APPLE)

# Activate hpp-util logging if requested
set(HPP_DEBUG
FALSE
CACHE BOOL "trigger hpp-util debug output")
set(HPP_DEBUG FALSE CACHE BOOL "trigger hpp-util debug output")
if(HPP_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_DEBUG")
endif()
# Activate hpp-util logging if requested
set(HPP_BENCHMARK
FALSE
CACHE BOOL "trigger hpp-util benchmark output")
set(HPP_BENCHMARK FALSE CACHE BOOL "trigger hpp-util benchmark output")
if(HPP_BENCHMARK)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_ENABLE_BENCHMARK")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHPP_ENABLE_BENCHMARK")
endif()
# Ask Doxygen to create a tree view in html documentation
set(DOXYGEN_TREEVIEW
"NO"
CACHE STRING "Set to YES to generate a tree view in the html documentation")
CACHE STRING
"Set to YES to generate a tree view in the html documentation"
)

# Declare Headers
set(${PROJECT_NAME}_HEADERS
Expand All @@ -94,7 +100,8 @@ set(${PROJECT_NAME}_HEADERS
include/pyhpp/ref.hh
include/pyhpp/stl-pair.hh
include/pyhpp/util.hh
include/pyhpp/vector-indexing-suite.hh)
include/pyhpp/vector-indexing-suite.hh
)

set(PYTHON_COMPONENTS Interpreter Development NumPy)

Expand All @@ -110,18 +117,15 @@ findpython()
search_for_boost_python()

if(BUILD_TESTING)
find_package(example-robot-data REQUIRED)
find_package(hpp-environments REQUIRED)
# find_package(hpp_tutorial REQUIRED) TODO: dependency loop ?
find_package(example-robot-data REQUIRED)
find_package(hpp-environments REQUIRED)
# find_package(hpp_tutorial REQUIRED) TODO: dependency loop ?
endif()

add_library(${PROJECT_NAME} INTERFACE)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION lib)
install(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)

add_subdirectory(src)
if(BUILD_TESTING)
add_subdirectory(tests)
add_subdirectory(tests)
endif()
Loading