Skip to content

Commit

Permalink
pre-commit run -a
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Oct 5, 2022
1 parent 10b57a2 commit ef225e1
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 63 deletions.
82 changes: 40 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,58 +1,56 @@
#
# Copyright (c) 2016, 2020 CNRS
# Author: Anna Seppala, Guilhem Saurel
# Copyright (c) 2016, 2020 CNRS Author: Anna Seppala, Guilhem Saurel
#
# This file is part of hpp-model hpp-model is free software: you can
# redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This file is part of hpp-model
# hpp-model is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# hpp-model is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# hpp-model If not, see
# <http://www.gnu.org/licenses/>.
# hpp-model is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Lesser Public License for more
# details. You should have received a copy of the GNU Lesser General Public
# License along with hpp-model If not, see <http://www.gnu.org/licenses/>.

CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
cmake_minimum_required(VERSION 3.1)

SET(PROJECT_NAME hpp-affordance)
SET(PROJECT_DESCRIPTION "Implementation to Extract Whole-Body Affordances for Mutli-Contact Planning.")
set(PROJECT_NAME hpp-affordance)
set(PROJECT_DESCRIPTION
"Implementation to Extract Whole-Body Affordances for Mutli-Contact Planning."
)

SET(CXX_DISABLE_WERROR TRUE)
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
set(CXX_DISABLE_WERROR TRUE)
set(PROJECT_USE_CMAKE_EXPORT TRUE)

INCLUDE(cmake/hpp.cmake)
include(cmake/hpp.cmake)

COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
compute_project_args(PROJECT_ARGS LANGUAGES CXX)
project(${PROJECT_NAME} ${PROJECT_ARGS})

ADD_PROJECT_DEPENDENCY(Eigen3)
ADD_PROJECT_DEPENDENCY(hpp-fcl)
add_project_dependency(Eigen3)
add_project_dependency(hpp-fcl)

SET(${PROJECT_NAME}_HEADERS
include/hpp/affordance/fwd.hh
include/hpp/affordance/affordance-extraction.hh
include/hpp/affordance/operations.hh
)
set(${PROJECT_NAME}_HEADERS
include/hpp/affordance/fwd.hh
include/hpp/affordance/affordance-extraction.hh
include/hpp/affordance/operations.hh)

SET(${PROJECT_NAME}_SOURCES
src/affordance-extraction.cc
)
set(${PROJECT_NAME}_SOURCES src/affordance-extraction.cc)

ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} hpp-fcl::hpp-fcl)
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR})
target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} hpp-fcl::hpp-fcl)

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

ADD_SUBDIRECTORY(tests)
add_subdirectory(tests)

CONFIG_FILES(include/hpp/affordance/doc.hh)
PKG_CONFIG_APPEND_LIBS("hpp-affordance")
config_files(include/hpp/affordance/doc.hh)
pkg_config_append_libs("hpp-affordance")

INSTALL(FILES package.xml DESTINATION share/${PROJECT_NAME})
install(FILES package.xml DESTINATION share/${PROJECT_NAME})
35 changes: 14 additions & 21 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,21 @@
#
# Author: Anna Seppala
#
# This file is part of hpp-affordance
# hpp-affordance is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This file is part of hpp-affordance hpp-affordance is free software: you can
# redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# hpp-affordance is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Lesser Public License for more details.
# You should have received a copy of the GNU Lesser General Public License
# along with hpp-affordance If not, see <http://www.gnu.org/licenses/>.
# hpp-affordance is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Lesser Public License for more
# details. You should have received a copy of the GNU Lesser General Public
# License along with hpp-affordance If not, see <http://www.gnu.org/licenses/>.

SET(${PROJECT_NAME}_TESTS
operations
one-triangle1
one-triangle2
oriented-triangles1
oriented-triangles2
)
set(${PROJECT_NAME}_TESTS operations one-triangle1 one-triangle2
oriented-triangles1 oriented-triangles2)

FOREACH(test ${${PROJECT_NAME}_TESTS})
ADD_UNIT_TEST(${test} "test-${test}.cc")
foreach(test ${${PROJECT_NAME}_TESTS})
add_unit_test(${test} "test-${test}.cc")
target_link_libraries(${test} ${PROJECT_NAME})
ENDFOREACH(test)
endforeach(test)

0 comments on commit ef225e1

Please sign in to comment.