-
Notifications
You must be signed in to change notification settings - Fork 5
[cmake] Simplify cmake files for build-check and non-regression testing #88
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a15568e
[cmake] Syntax for easy-read in CMakeLists.txt
th-skam 7509b75
[cmake] Comment out ignored and deprecated headers/sources
th-skam 942cfb0
[cmake] Sync dependencies between CMakeLists and Config.cmake.in files
th-skam cef93a7
[cmake] Group target include directories commands
th-skam 9225bd4
[cmake] Set project version in CMake using an env var
th-skam dd54295
[cmake] Correct installation folders for headers and source files in …
th-skam 033e7e5
[cmake] Remove scene, ingored and deprecated files from the library
th-skam 54dd8a6
[cmake] Set AUTO_SET_TARGET_PROPERTIES in CMakeLists
th-skam 40c2deb
[src] Moved .h/.cpp files to src/CollisionAlgorithm - mimic other SOF…
th-skam 6214846
[cmake] Clean up unnecessary manual configurations
th-skam 87c0737
[src] Adopt SOFA namespace convention; all lowercase
th-skam 19504be
[cmake] Use RELOCATABLE macro for plugins
th-skam ec312a3
[cmake] Drop glob for src files, add them manually - remove some unne…
th-skam cd45f8a
[src] Add config.h - use init plugin mechanism - register symbols usi…
th-skam 3c16631
[src] Merge and absorb modifications due to the addition of operation…
th-skam e042ea6
[cmake] Add missing headers & sources of operations classes to CMakeL…
th-skam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| #include <CollisionAlgorithm/algorithm/InsertionAlgorithm.h> | ||
| #include <sofa/core/ObjectFactory.h> | ||
|
|
||
| namespace sofa::collisionAlgorithm | ||
| namespace sofa::collisionalgorithm | ||
| { | ||
| void registerInsertionAlgorithm(sofa::core::ObjectFactory* factory) | ||
| { | ||
| factory->registerObjects(sofa::core::ObjectRegistrationData( | ||
| "A class implementing a customized needle insertion algorithm") | ||
| .add<InsertionAlgorithm>()); | ||
| } | ||
| } // namespace sofa::collisionAlgorithm | ||
| } // namespace sofa::collisionalgorithm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| #include <CollisionAlgorithm/broadphase/FullAABBBroadPhase.h> | ||
| #include <sofa/core/ObjectFactory.h> | ||
|
|
||
| namespace sofa::collisionAlgorithm | ||
| namespace sofa::collisionalgorithm | ||
| { | ||
| void registerFullAABBBroadPhase(sofa::core::ObjectFactory* factory) | ||
| { | ||
| factory->registerObjects(sofa::core::ObjectRegistrationData("").add<FullAABBBroadPhase>()); | ||
| } | ||
| } // namespace sofa::collisionAlgorithm | ||
| } // namespace sofa::collisionalgorithm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #pragma once | ||
|
|
||
| #include <sofa/config.h> | ||
| #include <sofa/config/sharedlibrary_defines.h> | ||
|
|
||
| #define COLLISIONALGORITHM_VERSION @PROJECT_VERSION@ | ||
|
|
||
| #ifdef SOFA_BUILD_COLLISIONALGORITHM | ||
| # define SOFA_TARGET @PROJECT_NAME@ | ||
| # define SOFA_COLLISIONALGORITHM_API SOFA_EXPORT_DYNAMIC_LIBRARY | ||
| #else | ||
| # define SOFA_COLLISIONALGORITHM_API SOFA_IMPORT_DYNAMIC_LIBRARY | ||
| #endif | ||
|
|
||
| namespace sofa::collisionalgorithm | ||
| { | ||
| constexpr const char* MODULE_NAME = "@PROJECT_NAME@"; | ||
| constexpr const char* MODULE_VERSION = "@PROJECT_VERSION@"; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the good way but I saw that it is just used in the init.cpp files. I think you will need to use it to export the classes as well (or the explicit instanciations if they are templated).
But if you are not on Windows, it will be a bit difficult to do it "blindly" so it may be the best to do it in a other PR and test it on Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for these tips @fredroy!
A question about using this feature properly in SOFA plugins:
I would be using the *_API macro to export classes in the following situations:
and limit the export right there. Would you recommend this approach or perhaps export classes in other cases as well?