Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eiquadprog
Commits
8b9c97ae
Commit
8b9c97ae
authored
Mar 11, 2020
by
Guilhem Saurel
Browse files
CMake export
parent
25242f0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
8b9c97ae
#
# Copyright (c) 2019 CNRS
# Copyright (c) 2019
-2020
CNRS
#
# This file is part of eiquadprog.
#
...
...
@@ -17,37 +17,45 @@
# along with eiquadprog. If not, see <https://www.gnu.org/licenses/>.
#
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.
0
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 3.
1
)
SET
(
PROJECT_NAMESPACE stack-of-tasks
)
# Project properties
SET
(
PROJECT_ORG stack-of-tasks
)
SET
(
PROJECT_NAME eiquadprog
)
SET
(
PROJECT_DESCRIPTION
"C++ reimplementation of eiquadprog"
)
SET
(
PROJECT_URL
"https://gepgitlab.laas.fr/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
"
)
SET
(
PROJECT_URL
"https://github.com/
${
PROJECT_ORG
}
/
${
PROJECT_NAME
}
"
)
# Project configuration
SET
(
PROJECT_USE_CMAKE_EXPORT TRUE
)
SET
(
CXX_DISABLE_WERROR TRUE
)
SET
(
CMAKE_VERBOSE_MAKEFILE TRUE
)
SET
(
PROJECT_CUSTOM_HEADER_EXTENSION
"hpp"
)
# JRL-cmakemodule setup
INCLUDE
(
cmake/base.cmake
)
INCLUDE
(
cmake/boost.cmake
)
INCLUDE
(
cmake/eigen.cmake
)
INCLUDE
(
cmake/test.cmake
)
# Disable -Werror on Unix for now.
SET
(
CXX_DISABLE_WERROR True
)
SET
(
CMAKE_VERBOSE_MAKEFILE True
)
CMAKE_POLICY
(
SET CMP0048 NEW
)
PROJECT
(
${
PROJECT_NAME
}
VERSION
${
PROJECT_VERSION_FULL
}
LANGUAGES CXX
)
# ----------------------------------------------------
# --- DEPENDENCIES -----------------------------------
# ----------------------------------------------------
ADD_REQUIRED_DEPENDENCY
(
"eigen3 >= 3.2.92"
)
# Project definition
COMPUTE_PROJECT_ARGS
(
PROJECT_ARGS LANGUAGES CXX
)
PROJECT
(
${
PROJECT_NAME
}
${
PROJECT_ARGS
}
)
# Project dependencies
ADD_PROJECT_DEPENDENCY
(
Eigen3 3.2.92 REQUIRED PKG_CONFIG_REQUIRES
"eigen3 >= 3.2.92"
)
SET
(
BOOST_COMPONENTS unit_test_framework
)
SEARCH_FOR_BOOST
()
INCLUDE_DIRECTORIES
(
SYSTEM
${
Boost_INCLUDE_DIRS
}
)
# --- PACKAGING ----------------------------------------------------------------
PKG_CONFIG_APPEND_LIBS
(
${
PROJECT_NAME
}
)
# Main Library
SET
(
${
PROJECT_NAME
}
_HEADERS
include/
${
PROJECT_NAME
}
/eiquadprog.hpp
include/
${
PROJECT_NAME
}
/eiquadprog-fast.hpp
include/
${
PROJECT_NAME
}
/eiquadprog-fast.hxx
include/
${
PROJECT_NAME
}
/eiquadprog-rt.hpp
include/
${
PROJECT_NAME
}
/eiquadprog-rt.hxx
)
ADD_LIBRARY
(
${
PROJECT_NAME
}
INTERFACE
)
TARGET_INCLUDE_DIRECTORIES
(
${
PROJECT_NAME
}
SYSTEM INTERFACE
${
EIGEN3_INCLUDE_DIRS
}
)
TARGET_INCLUDE_DIRECTORIES
(
${
PROJECT_NAME
}
INTERFACE $<INSTALL_INTERFACE:include>
)
INSTALL
(
TARGETS
${
PROJECT_NAME
}
EXPORT
${
TARGETS_EXPORT_NAME
}
DESTINATION lib
)
ADD_SUBDIRECTORY
(
include/
${
PROJECT_NAME
}
)
ADD_SUBDIRECTORY
(
unittest
)
cmake
@
4514454f
Compare
efa25a99
...
4514454f
Subproject commit
efa25a9976b8a6fc9f51d26924d4238d0d4820b1
Subproject commit
4514454f5f9462047b5c29f61b6c3e0db731c416
include/eiquadprog/CMakeLists.txt
deleted
100644 → 0
View file @
25242f0d
#
# This file is part of eiquadprog.
#
# eiquadprog 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.
#
# eiquadprog 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 Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with eiquadprog. If not, see <https://www.gnu.org/licenses/>.
#
SET
(
${
PROJECT_NAME
}
_HEADERS
eiquadprog.hpp
eiquadprog-fast.hpp
eiquadprog-fast.hxx
eiquadprog-rt.hpp
eiquadprog-rt.hxx
)
INSTALL
(
FILES
${${
PROJECT_NAME
}
_HEADERS
}
DESTINATION include/
${
PROJECT_NAME
}
)
unittest/CMakeLists.txt
View file @
8b9c97ae
...
...
@@ -18,14 +18,13 @@
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
#test paths and names (without .cpp extension)
SET
(
TESTS
SET
(
TESTS
eiquadprog-basic
eiquadprog-fast
eiquadprog-rt
)
FOREACH
(
test
${
TESTS
}
)
ADD_UNIT_TEST
(
${
test
}
${
test
}
)
TARGET_LINK_LIBRARIES
(
${
test
}
${
Boost_UNIT_TEST_FRAMEWORK_LIBRARY
}
)
PKG_CONFIG_USE_DEPENDENCY
(
${
test
}
eigen3
)
ADD_UNIT_TEST
(
${
test
}
${
test
}
.cpp
)
TARGET_LINK_LIBRARIES
(
${
test
}
${
PROJECT_NAME
}
${
Boost_UNIT_TEST_FRAMEWORK_LIBRARY
}
)
ENDFOREACH
(
test
${
TESTS
}
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment