Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-6.1' into eigen_mem_align
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.md
	dart/CMakeLists.txt
  • Loading branch information
jslee02 committed Oct 13, 2016
2 parents 4c5100c + d08ce8a commit a5c3d43
Show file tree
Hide file tree
Showing 96 changed files with 527 additions and 139 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

* Build

* Modified to build DART without additional SIMD options by default: [#790](https://github.com/dartsim/dart/pull/790)
* Modified to build DART without SIMD options by default: [#790](https://github.com/dartsim/dart/pull/790)
* Modified to build external libraries as separately build targets: [#787](https://github.com/dartsim/dart/pull/787)
* Modified to export CMake target files separately per target: [#786](https://github.com/dartsim/dart/pull/786)

### DART 6.1.0 (2016-10-07)
Expand Down
77 changes: 36 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,6 @@ function(dart_add_tutorial)
dart_property_add(DART_TUTORIALS ${ARGN})
endfunction(dart_add_tutorial)

function(dart_add_unittest)
dart_property_add(DART_UNITTESTS ${ARGN})
endfunction(dart_add_unittest)

#===============================================================================
# Add sub-directories
#===============================================================================
Expand All @@ -281,20 +277,6 @@ if(TINYXML_FOUND AND TINYXML2_FOUND AND BULLET_FOUND)
enable_testing()
add_subdirectory(unittests EXCLUDE_FROM_ALL)

get_property(unittests GLOBAL PROPERTY DART_UNITTESTS)
add_custom_target(tests DEPENDS ${unittests})

if(DART_VERBOSE)
message(STATUS "")
message(STATUS "[ Unit Tests ]")
foreach(unittest ${unittests})
message(STATUS "Adding test: ${unittest}")
endforeach(unittest ${unittests})
else(DART_VERBOSE)
list(LENGTH unittests unittests_length)
message(STATUS "Adding ${unittests_length} unittests")
endif(DART_VERBOSE)

if (OPENGL_FOUND AND HAVE_GLUT)

# Add an "examples" target to build examples.
Expand Down Expand Up @@ -432,33 +414,46 @@ endif()
#===============================================================================
if(DOXYGEN_FOUND)

set(DOXYGEN_DOXYFILE_IN ${PROJECT_SOURCE_DIR}/doxygen/Doxyfile.in )
set(DOXYGEN_DOXYFILE ${PROJECT_BINARY_DIR}/doxygen/Doxyfile )
set(DOXYGEN_HTML_INDEX ${PROJECT_SOURCE_DIR}/doxygen/html/index.html)
set(DOXYGEN_OUTPUT_ROOT ${PROJECT_SOURCE_DIR}/doxygen/html ) # Pasted into Doxyfile.in
set(DOXYGEN_GENERATE_TAGFILE ${DOXYGEN_OUTPUT_ROOT}/${PROJECT_NAME}.tag)
set(DOXYGEN_INCLUDE_PATH ${PROJECT_SOURCE_DIR})
set(DOXYGEN_INPUT_ROOT ${PROJECT_SOURCE_DIR}/dart ) # Pasted into Doxyfile.in
set(DOXYGEN_EXTRA_INPUTS ${PROJECT_SOURCE_DIR}/doxygen/mainpage.dox ) # Pasted into Doxyfile.in

set(DOXYGEN_DOXYFILE_IN "${PROJECT_SOURCE_DIR}/doxygen/Doxyfile.in" )
set(DOXYGEN_DOXYFILE "${PROJECT_BINARY_DIR}/doxygen/Doxyfile" )
set(DOXYGEN_HTML_INDEX "${PROJECT_SOURCE_DIR}/doxygen/html/index.html")
set(DOXYGEN_OUTPUT_ROOT "${PROJECT_SOURCE_DIR}/doxygen/html" )
set(DOXYGEN_GENERATE_TAGFILE "${DOXYGEN_OUTPUT_ROOT}/${PROJECT_NAME}.tag" )
set(DOXYGEN_INCLUDE_PATH "${PROJECT_SOURCE_DIR}" )
set(DOXYGEN_INPUT_ROOT "${PROJECT_SOURCE_DIR}/dart" )
set(DOXYGEN_EXTRA_INPUTS "${PROJECT_SOURCE_DIR}/doxygen/mainpage.dox" )
set(DOXYGEN_EXCLUDE "${PROJECT_SOURCE_DIR}/dart/external" )

# Generate a Doxyfile. This uses the variables:
#
# - DOXYGEN_OUTPUT_ROOT
# - DOXYGEN_GENERATE_TAGFILE
# - DOXYGEN_EXTRA_INPUTS
# - DOXYGEN_INPUT_ROOT
# - DOXYGEN_EXCLUDE
configure_file(${DOXYGEN_DOXYFILE_IN} ${DOXYGEN_DOXYFILE} @ONLY)
file(COPY "${PROJECT_SOURCE_DIR}/doxygen/DART logo.png" DESTINATION ${DOXYGEN_OUTPUT_ROOT})
add_custom_command(OUTPUT ${DOXYGEN_HTML_INDEX}
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} -u ${DOXYGEN_DOXYFILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_DOXYFILE}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doxygen
DEPENDS ${DOXYGEN_DOXYFILE}
file(
COPY "${PROJECT_SOURCE_DIR}/doxygen/DART logo.png"
DESTINATION ${DOXYGEN_OUTPUT_ROOT}
)
add_custom_command(
OUTPUT ${DOXYGEN_HTML_INDEX}
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} -u ${DOXYGEN_DOXYFILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_DOXYFILE}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doxygen
DEPENDS ${DOXYGEN_DOXYFILE}
)
# add_custom_target(docs ALL DEPENDS ${DOXYGEN_HTML_INDEX})
add_custom_target(docs DEPENDS ${DOXYGEN_HTML_INDEX})
add_custom_target(docs_forced
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} -u ${DOXYGEN_DOXYFILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_DOXYFILE}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doxygen
add_custom_target(
docs_forced
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} -u ${DOXYGEN_DOXYFILE}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_DOXYFILE}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doxygen
)

endif()
Expand Down
23 changes: 18 additions & 5 deletions dart/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
add_subdirectory(external)

# Enable multi-threaded compilation.
# We do this here and not in the root folder since the examples and the
# tutorials do not have enough source files to benefit from this.
Expand Down Expand Up @@ -136,10 +138,12 @@ target_include_directories(
)
target_link_libraries(
dart
${CCD_LIBRARIES}
${FCL_LIBRARIES}
${ASSIMP_LIBRARIES}
${Boost_LIBRARIES}
PUBLIC
${CCD_LIBRARIES}
${FCL_LIBRARIES}
${ASSIMP_LIBRARIES}
${Boost_LIBRARIES}
${PROJECT_NAME}-external-odelcpsolver
)

# Build DART with all available SIMD instructions
Expand All @@ -148,7 +152,16 @@ if(DART_ENABLE_SIMD AND NOT MSVC)
endif()

# Default component
add_component_targets(${PROJECT_NAME} dart dart)
add_component_targets(
${PROJECT_NAME}
dart # component name
dart # target name
)
add_component_dependencies(
${PROJECT_NAME}
dart
external-odelcpsolver
)

# Coverage test
dart_coveralls_add(${dart_core_headers} ${dart_core_sources})
Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/BallJointConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
#include <iostream>
#include "dart/constraint/BallJointConstraint.hpp"

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/lcpsolver/lcp.h"

namespace dart {
namespace constraint {
Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/ContactConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@

#include <iostream>

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/common/Console.hpp"
#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/collision/CollisionObject.hpp"
#include "dart/lcpsolver/lcp.h"
#include "dart/math/Helpers.hpp"

#define DART_EPSILON 1e-6
Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/DantzigLCPSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
#include <iostream>
#endif

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/common/Console.hpp"
#include "dart/constraint/ConstraintBase.hpp"
#include "dart/constraint/ConstrainedGroup.hpp"
#include "dart/lcpsolver/Lemke.hpp"
#include "dart/lcpsolver/lcp.h"

namespace dart {
namespace constraint {
Expand Down
1 change: 0 additions & 1 deletion dart/constraint/JointCoulombFrictionConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/Joint.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/lcpsolver/lcp.h"

#define DART_CFM 1e-9

Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/JointLimitConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@

#include <iostream>

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/common/Console.hpp"
#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/Joint.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/lcpsolver/lcp.h"

#define DART_ERROR_ALLOWANCE 0.0
#define DART_ERP 0.01
Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/PGSLCPSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
#include <iostream>
#endif

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/common/Console.hpp"
#include "dart/constraint/ConstraintBase.hpp"
#include "dart/constraint/ConstrainedGroup.hpp"
#include "dart/lcpsolver/Lemke.hpp"
#include "dart/lcpsolver/lcp.h"

namespace dart {
namespace constraint {
Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/ServoMotorConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@

#include <iostream>

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/common/Console.hpp"
#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/Joint.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/lcpsolver/lcp.h"

#define DART_CFM 1e-9

Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/SoftContactConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

#include <iostream>

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/common/Console.hpp"
#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/PointMass.hpp"
Expand All @@ -41,7 +43,6 @@
#include "dart/dynamics/Shape.hpp"
#include "dart/dynamics/SoftMeshShape.hpp"
#include "dart/collision/CollisionObject.hpp"
#include "dart/lcpsolver/lcp.h"

#define DART_EPSILON 1e-6
#define DART_ERROR_ALLOWANCE 0.0
Expand Down
3 changes: 2 additions & 1 deletion dart/constraint/WeldJointConstraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@

#include "dart/constraint/WeldJointConstraint.hpp"

#include "dart/external/odelcpsolver/lcp.h"

#include "dart/dynamics/BodyNode.hpp"
#include "dart/dynamics/Skeleton.hpp"
#include "dart/lcpsolver/lcp.h"

namespace dart {
namespace constraint {
Expand Down
3 changes: 3 additions & 0 deletions dart/external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_subdirectory(imgui)
add_subdirectory(lodepng)
add_subdirectory(odelcpsolver)
24 changes: 24 additions & 0 deletions dart/external/imgui/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Search all header and source files
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")

# Set local target name
set(target_name ${PROJECT_NAME}-external-imgui)
set(component_name external-imgui)

dart_add_library(${target_name} ${hdrs} ${srcs})
include_directories(
${target_name}
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
)

# Component
add_component(${PROJECT_NAME} ${component_name})
add_component_targets(${PROJECT_NAME} ${component_name} ${target_name})

# Install
install(
FILES ${hdrs}
DESTINATION include/dart/external/imgui
COMPONENT headers
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions dart/external/lodepng/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Search all header and source files
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")

# Set local target name
set(target_name ${PROJECT_NAME}-external-lodepng)
set(component_name external-lodepng)

dart_add_library(${target_name} ${hdrs} ${srcs})
include_directories(
${target_name}
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
)

# Component
add_component(${PROJECT_NAME} ${component_name})
add_component_targets(${PROJECT_NAME} ${component_name} ${target_name})

# Install
install(
FILES ${hdrs}
DESTINATION include/dart/external/lodepng
COMPONENT headers
)
File renamed without changes.
File renamed without changes.
24 changes: 24 additions & 0 deletions dart/external/odelcpsolver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Search all header and source files
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")

# Set local target name
set(target_name ${PROJECT_NAME}-external-odelcpsolver)
set(component_name external-odelcpsolver)

dart_add_library(${target_name} ${hdrs} ${srcs})
include_directories(
${target_name}
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}"
)

# Component
add_component(${PROJECT_NAME} ${component_name})
add_component_targets(${PROJECT_NAME} ${component_name} ${target_name})

# Install
install(
FILES ${hdrs}
DESTINATION include/dart/external/odelcpsolver
COMPONENT headers
)
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#include <math.h>

#include "dart/lcpsolver/odeconfig.h"
#include "dart/lcpsolver/error.h"
#include "odeconfig.h"
#include "error.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* *
*************************************************************************/

#include "dart/lcpsolver/odeconfig.h"
#include "dart/lcpsolver/error.h"
#include "odeconfig.h"
#include "error.h"



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifndef _ODE_ERROR_H_
#define _ODE_ERROR_H_

#include "dart/lcpsolver/odeconfig.h"
#include "odeconfig.h"

#ifdef __cplusplus
extern "C" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/* generated code, do not edit. */

#include "dart/lcpsolver/matrix.h"
#include "matrix.h"


dReal _dDot (const dReal *a, const dReal *b, int n)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/* generated code, do not edit. */

#include "dart/lcpsolver/matrix.h"
#include "matrix.h"

/* solve L*X=B, with B containing 1 right hand sides.
* L is an n*n lower triangular matrix with ones on the diagonal.
Expand Down
Loading

0 comments on commit a5c3d43

Please sign in to comment.