Skip to content

Commit 6a96ce7

Browse files
committed
[build] Remove support for CMake < 3.22.1 and Eigen < 3.4.0
(cherry picked from commit 7a13a30)
1 parent 7bc91d9 commit 6a96ce7

18 files changed

+98
-321
lines changed

.github/workflows/api_doc.yml

+41-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,47 @@ jobs:
5252
- name: Install Dependencies with cache
5353
uses: awalsh128/[email protected]
5454
with:
55-
packages: build-essential libboost-all-dev clang clang-format-12 cmake curl doxygen gcovr git lcov lsb-release pkg-config software-properties-common valgrind libassimp-dev libccd-dev libeigen3-dev libfcl-dev libfmt-dev coinor-libipopt-dev freeglut3-dev libxi-dev libxmu-dev libbullet-dev libtinyxml2-dev liburdfdom-dev liburdfdom-headers-dev libopenscenegraph-dev libnlopt-cxx-dev liboctomap-dev libode-dev libspdlog-dev ocl-icd-opencl-dev libpython3-dev pybind11-dev python3 python3-dev python3-distutils python3-numpy python3-pip python3-setuptools
55+
packages: |
56+
build-essential
57+
libboost-all-dev
58+
clang
59+
clang-format-12
60+
cmake
61+
curl
62+
doxygen
63+
gcovr
64+
git
65+
lcov
66+
lsb-release
67+
pkg-config
68+
software-properties-common
69+
valgrind
70+
libassimp-dev
71+
libeigen3-dev
72+
libfcl-dev
73+
libfmt-dev
74+
coinor-libipopt-dev
75+
freeglut3-dev
76+
libxi-dev
77+
libxmu-dev
78+
libbullet-dev
79+
libtinyxml2-dev
80+
liburdfdom-dev
81+
liburdfdom-headers-dev
82+
libopenscenegraph-dev
83+
libnlopt-cxx-dev
84+
liboctomap-dev
85+
libode-dev
86+
libspdlog-dev
87+
ocl-icd-opencl-dev
88+
libpython3-dev
89+
pybind11-dev
90+
python3
91+
python3-dev
92+
python3-distutils
93+
python3-numpy
94+
python3-pip
95+
python3-setuptools
5696
version: 1.1
5797

5898
- name: Install Python dependencies

.github/workflows/ci_windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- uses: johnwason/vcpkg-action@v6
3939
with:
4040
# TODO: Add ode and coin-or-ipopt
41-
pkgs: assimp ccd eigen3 fcl fmt spdlog bullet3 freeglut glfw3 nlopt opengl osg pagmo2 tinyxml2 urdfdom
41+
pkgs: assimp eigen3 fcl fmt spdlog bullet3 freeglut glfw3 nlopt opengl osg pagmo2 tinyxml2 urdfdom
4242
triplet: x64-windows
4343
revision: "2024.02.14"
4444
github-binarycache: true

Brewfile

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ brew 'eigen'
88
brew 'fcl'
99
brew 'fmt'
1010
brew 'ipopt'
11-
brew 'libccd'
1211
brew 'nlopt'
1312
brew 'octomap'
1413
brew 'ode'

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ RUN apt-get update \
1818
&& apt-get -y install --no-install-recommends \
1919
libeigen3-dev \
2020
libassimp-dev \
21-
libccd-dev \
2221
libfcl-dev \
2322
libfmt-dev \
2423
libnlopt-cxx-dev \

cmake/DARTFindBullet.cmake

+2-9
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ find_package(Bullet COMPONENTS BulletMath BulletCollision MODULE QUIET)
1313

1414
if((BULLET_FOUND OR Bullet_FOUND) AND NOT TARGET Bullet)
1515
add_library(Bullet INTERFACE IMPORTED)
16-
if(CMAKE_VERSION VERSION_LESS 3.11)
17-
set_target_properties(Bullet PROPERTIES
18-
INTERFACE_INCLUDE_DIRECTORIES "${BULLET_INCLUDE_DIRS}"
19-
INTERFACE_LINK_LIBRARIES "${BULLET_LIBRARIES}"
20-
)
21-
else()
22-
target_include_directories(Bullet INTERFACE ${BULLET_INCLUDE_DIRS})
23-
target_link_libraries(Bullet INTERFACE ${BULLET_LIBRARIES})
24-
endif()
16+
target_include_directories(Bullet INTERFACE ${BULLET_INCLUDE_DIRS})
17+
target_link_libraries(Bullet INTERFACE ${BULLET_LIBRARIES})
2518
endif()

cmake/DARTFindOpenSceneGraph.cmake

+2-18
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,10 @@
66
#
77
# This file is provided under the "BSD-style" License
88

9-
if (CMAKE_VERSION VERSION_LESS 3.12)
10-
get_property(old_find_library_use_lib64_paths GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
11-
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
12-
endif()
13-
149
find_package(OpenSceneGraph 3.0 QUIET
1510
COMPONENTS osg osgViewer osgManipulator osgGA osgDB osgShadow osgUtil
1611
)
1712

18-
if (CMAKE_VERSION VERSION_LESS 3.12)
19-
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ${old_find_library_use_lib64_paths})
20-
endif()
21-
2213
# It seems that OPENSCENEGRAPH_FOUND will inadvertently get set to true when
2314
# OpenThreads is found, even if OpenSceneGraph is not installed. This is quite
2415
# possibly a bug in OSG's cmake configuration file. For now, it seems that
@@ -56,13 +47,6 @@ endif()
5647
# where the system that DART is built and where the system that consumes DART.
5748
if((OPENSCENEGRAPH_FOUND OR OpenSceneGraph_FOUND) AND NOT TARGET osg::osg)
5849
add_library(osg::osg INTERFACE IMPORTED)
59-
if(CMAKE_VERSION VERSION_LESS 3.11)
60-
set_target_properties(osg::osg PROPERTIES
61-
INTERFACE_INCLUDE_DIRECTORIES "${OPENSCENEGRAPH_INCLUDE_DIRS}"
62-
INTERFACE_LINK_LIBRARIES "${OPENSCENEGRAPH_LIBRARIES}"
63-
)
64-
else()
65-
target_include_directories(osg::osg INTERFACE ${OPENSCENEGRAPH_INCLUDE_DIRS})
66-
target_link_libraries(osg::osg INTERFACE ${OPENSCENEGRAPH_LIBRARIES})
67-
endif()
50+
target_include_directories(osg::osg INTERFACE ${OPENSCENEGRAPH_INCLUDE_DIRS})
51+
target_link_libraries(osg::osg INTERFACE ${OPENSCENEGRAPH_LIBRARIES})
6852
endif()

dart/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,6 @@ endif()
160160

161161
# C++ standard settings
162162
target_compile_features(dart PUBLIC cxx_std_17)
163-
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
164-
target_link_libraries(dart PUBLIC "stdc++fs")
165-
endif()
166163

167164
# Build DART with all available SIMD instructions
168165
if(DART_ENABLE_SIMD)

dart/common/Memory.hpp

+2-18
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
#include <dart/config.hpp>
3737

3838
#include <dart/common/Deprecated.hpp>
39-
#include <dart/common/detail/AlignedAllocator.hpp>
39+
40+
#include <Eigen/Core>
4041

4142
#include <map>
4243
#include <memory>
@@ -53,21 +54,6 @@ template <typename T, typename... Args>
5354
DART_DEPRECATED(6.9)
5455
std::unique_ptr<T> make_unique(Args&&... args);
5556

56-
#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8)
57-
58-
template <typename _Tp>
59-
using aligned_vector
60-
= std::vector<_Tp, dart::common::detail::aligned_allocator_cpp11<_Tp>>;
61-
62-
template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>>
63-
using aligned_map = std::map<
64-
_Key,
65-
_Tp,
66-
_Compare,
67-
dart::common::detail::aligned_allocator_cpp11<std::pair<const _Key, _Tp>>>;
68-
69-
#else
70-
7157
template <typename _Tp>
7258
using aligned_vector = std::vector<_Tp, Eigen::aligned_allocator<_Tp>>;
7359

@@ -78,8 +64,6 @@ using aligned_map = std::map<
7864
_Compare,
7965
Eigen::aligned_allocator<std::pair<const _Key, _Tp>>>;
8066

81-
#endif
82-
8367
} // namespace common
8468
} // namespace dart
8569

dart/common/detail/AlignedAllocator.hpp

-106
This file was deleted.

dart/common/detail/Memory-impl.hpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,10 @@
3636
#include <dart/config.hpp>
3737

3838
#include <Eigen/Core>
39+
#include <Eigen/StdVector>
3940

4041
#include <memory>
4142

42-
#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8)
43-
#include <dart/common/detail/AlignedAllocator.hpp>
44-
#else
45-
#include <Eigen/StdVector>
46-
#endif
47-
4843
namespace dart {
4944
namespace common {
5045

@@ -54,14 +49,8 @@ std::shared_ptr<_Tp> make_aligned_shared(_Args&&... __args)
5449
{
5550
using _Tp_nc = typename std::remove_const<_Tp>::type;
5651

57-
#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8)
58-
return std::allocate_shared<_Tp>(
59-
detail::aligned_allocator_cpp11<_Tp_nc>(),
60-
std::forward<_Args>(__args)...);
61-
#else
6252
return std::allocate_shared<_Tp>(
6353
Eigen::aligned_allocator<_Tp_nc>(), std::forward<_Args>(__args)...);
64-
#endif // EIGEN_VERSION_AT_LEAST(3,2,1) && EIGEN_VERSION_AT_MOST(3,2,8)
6554
}
6655

6756
//==============================================================================

dart/common/detail/SharedLibraryManager.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737

3838
#include <fstream>
3939

40+
#include <cassert>
41+
4042
namespace dart {
4143
namespace common {
4244
namespace detail {

0 commit comments

Comments
 (0)