diff --git a/cmake/DARTFindBullet.cmake b/cmake/DARTFindBullet.cmake index 82f2bf7b97b15..c2d3e63b793e6 100644 --- a/cmake/DARTFindBullet.cmake +++ b/cmake/DARTFindBullet.cmake @@ -13,13 +13,6 @@ find_package(Bullet COMPONENTS BulletMath BulletCollision MODULE QUIET) if((BULLET_FOUND OR Bullet_FOUND) AND NOT TARGET Bullet) add_library(Bullet INTERFACE IMPORTED) - if(CMAKE_VERSION VERSION_LESS 3.11) - set_target_properties(Bullet PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${BULLET_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${BULLET_LIBRARIES}" - ) - else() - target_include_directories(Bullet INTERFACE ${BULLET_INCLUDE_DIRS}) - target_link_libraries(Bullet INTERFACE ${BULLET_LIBRARIES}) - endif() + target_include_directories(Bullet INTERFACE ${BULLET_INCLUDE_DIRS}) + target_link_libraries(Bullet INTERFACE ${BULLET_LIBRARIES}) endif() diff --git a/cmake/DARTFindOpenSceneGraph.cmake b/cmake/DARTFindOpenSceneGraph.cmake index 48269ffad619c..bf16b17f8ea67 100644 --- a/cmake/DARTFindOpenSceneGraph.cmake +++ b/cmake/DARTFindOpenSceneGraph.cmake @@ -6,19 +6,10 @@ # # This file is provided under the "BSD-style" License -if (CMAKE_VERSION VERSION_LESS 3.12) - get_property(old_find_library_use_lib64_paths GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) - set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) -endif() - find_package(OpenSceneGraph 3.0 QUIET COMPONENTS osg osgViewer osgManipulator osgGA osgDB osgShadow osgUtil ) -if (CMAKE_VERSION VERSION_LESS 3.12) - set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ${old_find_library_use_lib64_paths}) -endif() - # It seems that OPENSCENEGRAPH_FOUND will inadvertently get set to true when # OpenThreads is found, even if OpenSceneGraph is not installed. This is quite # possibly a bug in OSG's cmake configuration file. For now, it seems that @@ -56,13 +47,6 @@ endif() # where the system that DART is built and where the system that consumes DART. if((OPENSCENEGRAPH_FOUND OR OpenSceneGraph_FOUND) AND NOT TARGET osg::osg) add_library(osg::osg INTERFACE IMPORTED) - if(CMAKE_VERSION VERSION_LESS 3.11) - set_target_properties(osg::osg PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${OPENSCENEGRAPH_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${OPENSCENEGRAPH_LIBRARIES}" - ) - else() - target_include_directories(osg::osg INTERFACE ${OPENSCENEGRAPH_INCLUDE_DIRS}) - target_link_libraries(osg::osg INTERFACE ${OPENSCENEGRAPH_LIBRARIES}) - endif() + target_include_directories(osg::osg INTERFACE ${OPENSCENEGRAPH_INCLUDE_DIRS}) + target_link_libraries(osg::osg INTERFACE ${OPENSCENEGRAPH_LIBRARIES}) endif() diff --git a/dart/CMakeLists.txt b/dart/CMakeLists.txt index 30626564f4692..ee558fd4cfbdd 100644 --- a/dart/CMakeLists.txt +++ b/dart/CMakeLists.txt @@ -146,9 +146,6 @@ endif() # C++ standard settings target_compile_features(dart PUBLIC cxx_std_17) -if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0) - target_link_libraries(dart PUBLIC "stdc++fs") -endif() # Build DART with all available SIMD instructions if(DART_ENABLE_SIMD) diff --git a/dart/common/Memory.hpp b/dart/common/Memory.hpp index a392c24830019..fce99bd3ed676 100644 --- a/dart/common/Memory.hpp +++ b/dart/common/Memory.hpp @@ -36,7 +36,6 @@ #include #include -#include #include #include @@ -53,21 +52,6 @@ template DART_DEPRECATED(6.9) std::unique_ptr make_unique(Args&&... args); -#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8) - -template -using aligned_vector - = std::vector<_Tp, dart::common::detail::aligned_allocator_cpp11<_Tp>>; - -template > -using aligned_map = std::map< - _Key, - _Tp, - _Compare, - dart::common::detail::aligned_allocator_cpp11>>; - -#else - template using aligned_vector = std::vector<_Tp, Eigen::aligned_allocator<_Tp>>; @@ -78,8 +62,6 @@ using aligned_map = std::map< _Compare, Eigen::aligned_allocator>>; -#endif - } // namespace common } // namespace dart diff --git a/dart/common/detail/AlignedAllocator.hpp b/dart/common/detail/AlignedAllocator.hpp deleted file mode 100644 index 52ebb9b312045..0000000000000 --- a/dart/common/detail/AlignedAllocator.hpp +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2011-2024, The DART development contributors - * All rights reserved. - * - * The list of contributors can be found at: - * https://github.com/dartsim/dart/blob/main/LICENSE - * - * This file is provided under the following "BSD-style" License: - * Redistribution and use in source and binary forms, with or - * without modification, are permitted provided that the following - * conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_ -#define DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_ - -#include - -#include - -#include - -namespace dart { -namespace common { - -#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8) - -namespace detail { - -/// Aligned allocator that is compatible with C++11 -// Ref: https://bitbucket.org/eigen/eigen/commits/f5b7700 -// TODO: Remove this and use Eigen::aligned_allocator once new version of Eigen -// is released with above commit. -template -class aligned_allocator_cpp11 : public std::allocator -{ -public: - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef T& reference; - typedef const T& const_reference; - typedef T value_type; - - template - struct rebind - { - typedef aligned_allocator_cpp11 other; - }; - - aligned_allocator_cpp11() : std::allocator() {} - - aligned_allocator_cpp11(const aligned_allocator_cpp11& other) - : std::allocator(other) - { - } - - template - aligned_allocator_cpp11(const aligned_allocator_cpp11& other) - : std::allocator(other) - { - } - - ~aligned_allocator_cpp11() {} - - pointer allocate(size_type num, const void* /*hint*/ = 0) - { - Eigen::internal::check_size_for_overflow(num); - return static_cast( - Eigen::internal::aligned_malloc(num * sizeof(T))); - } - - void deallocate(pointer p, size_type /*num*/) - { - Eigen::internal::aligned_free(p); - } -}; - -} // namespace detail - -#endif // EIGEN_VERSION_AT_LEAST(3,2,1) && EIGEN_VERSION_AT_MOST(3,2,8) - -} // namespace common -} // namespace dart - -#endif // DART_COMMON_DETAIL_ALIGNEDALLOCATOR_HPP_ diff --git a/dart/common/detail/Memory-impl.hpp b/dart/common/detail/Memory-impl.hpp index 7ce8a13536ef0..03715d9c0e628 100644 --- a/dart/common/detail/Memory-impl.hpp +++ b/dart/common/detail/Memory-impl.hpp @@ -36,15 +36,10 @@ #include #include +#include #include -#if EIGEN_VERSION_AT_LEAST(3, 2, 1) && EIGEN_VERSION_AT_MOST(3, 2, 8) - #include -#else - #include -#endif - namespace dart { namespace common { diff --git a/docs/readthedocs/developer_guide/build.rst b/docs/readthedocs/developer_guide/build.rst index 76a6a2a17c6b0..0dd7659882045 100644 --- a/docs/readthedocs/developer_guide/build.rst +++ b/docs/readthedocs/developer_guide/build.rst @@ -129,6 +129,19 @@ FreeBSD (experimental) TODO +Dependency Info +~~~~~~~~~~~~~~~ + +Here's a summary of the dependencies required to build DART (WIP): + ++------------+----------+---------+--------------+-------+ +| Dependency | Required | Type | Min. Version | Notes | ++============+==========+=========+==============+=======+ +| CMake | Yes | Build | 3.22.1 | | ++------------+----------+---------+--------------+-------+ +| Eigen | Yes | Runtime | 3.4.0 | | ++------------+----------+---------+--------------+-------+ + Clone the DART Repository ~~~~~~~~~~~~~~~~~~~~~~~~~