Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use individual cmake files for each namespaces #278

Merged
merged 7 commits into from
Nov 27, 2014

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Nov 25, 2014

This pull request divides the single cmake file into multiple files for each namespace. DART have some optional dependencies such as bullet collision, nlopt, ipopt, and snopt, and there are optional code, which should be built only when the corresponding optional dependencies are installed. Previously, DART has used single cmake files to build dart and dart-core (not examples nor unittests) and it makes hard to control the optional code to be built depends on the corresponding dependencies.

Additionally, this pull request adds all-inclusive headers, dart.h and dart-core.h. We had to include all the necessary header files of dart to write a software that has dependency of dart. For example, this is part of source code of hardcodedDesign app in dart:

-#include "dart/collision/CollisionDetector.h"
-#include "dart/dynamics/Skeleton.h"
-#include "dart/dynamics/BodyNode.h"
-//#include "dart/constraint/OldConstraintDynamics.h"
-#include "dart/dynamics/Joint.h"
-#include "dart/dynamics/MeshShape.h"
-#include "dart/dynamics/BoxShape.h"
-#include "dart/dynamics/CylinderShape.h"
-#include "dart/dynamics/EllipsoidShape.h"
-#include "dart/utils/Paths.h"
-#include "dart/common/Timer.h"
-#include "dart/math/Helpers.h"
-#include "dart/gui/GLFuncs.h"
-#include "dart/gui/Win3D.h"
-
-namespace dart {
-namespace dynamics {
-class Skeleton;
-class ConstraintDynamics;
-}  // namespace dynamics
-}  // namespace dart

This number of lines can be reduced single line as:

#include "dart/dart.h"

or

#include "dart/dart-core.h"

If we want to include specific namespaces of dart then:

#include "dart/common/common.h"
#include "dart/math/math.h"
#include "dart/dynamics/dynamics.h"

This fixes #158

@jslee02 jslee02 added this to the Release DART (14.12) milestone Nov 25, 2014
@jslee02 jslee02 added Comp: Build tag: feature request Indicates new feature requests priority: medium should be resolved before the next release labels Nov 25, 2014
@jslee02
Copy link
Member Author

jslee02 commented Nov 27, 2014

+1

1 similar comment
@karenliu
Copy link
Member

+1

jslee02 added a commit that referenced this pull request Nov 27, 2014
Use individual cmake files for each namespaces
@jslee02 jslee02 merged commit 5b5a80c into master Nov 27, 2014
@jslee02 jslee02 deleted the cmake_for_sub_directories branch November 29, 2014 05:54
This was referenced Jan 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium should be resolved before the next release tag: feature request Indicates new feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide namespace-level header files
2 participants