Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
strasdat committed Jun 9, 2024
1 parent 4fb1724 commit 61b4678
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: (thirdparty/.*)|(.txt)$
- id: check-yaml
args: ["--unsafe"]
- id: check-json
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.0
hooks:
- id: clang-format
types_or: [file]
files: .*(\.h|\.cpp|\.h\.glsl|\.proto)$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
files: ^.*\/ts\/.*\.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|tsx|xml|yaml|yml)$
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-format
- id: cmake-lint
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ if(BUILD_SOPHUS_TESTS)
add_subdirectory(test)
endif()

# Create examples make targets using ctest
option(BUILD_SOPHUS_EXAMPLES "Build examples." ON)
if(BUILD_SOPHUS_EXAMPLES)
add_subdirectory(examples)
endif()

# Build python sophus bindings
option(BUILD_PYTHON_BINDINGS "Build python sophus bindings." OFF)
if(BUILD_PYTHON_BINDINGS)
Expand Down
10 changes: 9 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
cmake_minimum_required(VERSION 3.16)

project(SophusExample)


find_package(Sophus 1.22.06 REQUIRED)


# Tests to run
SET( EXAMPLE_SOURCES HelloSO3)

FOREACH(example_src ${EXAMPLE_SOURCES})
ADD_EXECUTABLE( ${example_src} ${example_src}.cpp)
TARGET_LINK_LIBRARIES( ${example_src} sophus)
TARGET_LINK_LIBRARIES( ${example_src} Sophus::Sophus)
ENDFOREACH(example_src)

0 comments on commit 61b4678

Please sign in to comment.