-
Notifications
You must be signed in to change notification settings - Fork 48
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
Export the ezc3d target. #116
Merged
+46
−37
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 |
---|---|---|
|
@@ -371,7 +371,9 @@ void mexFunction( | |
} else if (type == ezc3d::DATA_TYPE::FLOAT) { | ||
std::vector<float> data; | ||
parseParam(mxGetDoubles(valueField), dimension, data); | ||
newParam.set(data, dimension); | ||
newParam.set( | ||
std::vector<double>(data.begin(), data.end()), | ||
dimension); | ||
Comment on lines
+374
to
+376
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thx! I did not update the Matlab interface yet with the new changes :) |
||
} else if (type == ezc3d::DATA_TYPE::CHAR) { | ||
std::vector<std::string> data; | ||
parseParam(valueField, dimension, data); | ||
|
@@ -386,7 +388,9 @@ void mexFunction( | |
if (!valueField || mxIsDouble(valueField)) { | ||
std::vector<float> data; | ||
parseParam(mxGetDoubles(valueField), dimension, data); | ||
newParam.set(data, dimension); | ||
newParam.set( | ||
std::vector<double>(data.begin(), data.end()), | ||
dimension); | ||
} else if (mxIsCell(valueField)) { | ||
std::vector<std::string> data; | ||
parseParam(valueField, dimension, data); | ||
|
This file contains 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 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
/// \date March 25th, 2020 | ||
/// | ||
|
||
#include <Matrix.h> | ||
#include "Matrix.h" | ||
|
||
/// | ||
/// \brief 3D data | ||
|
This file contains 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 |
---|---|---|
|
@@ -2,17 +2,11 @@ set(ezc3d_VERSION @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSI | |
|
||
@PACKAGE_INIT@ | ||
|
||
set_and_check(ezc3d_INCLUDE_DIR "@ezc3d_INCLUDE_FOLDER@") | ||
set_and_check(ezc3d_LIBRARY_DIR "@ezc3d_LIB_FOLDER@") | ||
set_and_check(ezc3d_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/@ezc3d_INCLUDE_FOLDER@") | ||
set_and_check(ezc3d_LIBRARY_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@/@ezc3d_LIB_FOLDER@") | ||
|
||
find_library (ezc3d_LIBRARY NAMES ezc3d ezc3d_debug PATHS ${ezc3d_LIBRARY_DIR}) | ||
set(ezc3d_LIBRARY ezc3d) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set ezc3d_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
include (FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args (ezc3d DEFAULT_MSG | ||
ezc3d_INCLUDE_DIR | ||
ezc3d_LIBRARY | ||
) | ||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
|
||
check_required_components(ezc3d) |
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.
RPath is no longer set properly for the Python interface if ${CMAKE_INSTALL_PREFIX} is not present. On my computer I get
Set runtime path of "/home/pariterre/Programmation/miniconda3/envs/ezc3d-dev/lib/python3.8/site-packages/ezc3d/_ezc3d.so" to "lib/ezc3d"
which is not the right path (unless you change the LD_LIBRARY_PATH which I don't want to do).
Any suggestions?
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.
There are two possibilities for the RPATH for python bindings:
A. If the python bindings are expected to be used from their installed location, then you can use a relative RPATH, because you know the relative location of the ezc3d library.
B. If the python bindings are expected to be installed into your python distribution, then you need to use an absolute RPATH to the ezc3d library.
Which do you prefer? I think OpenSim has a CMake flag to toggle between A and B. We have spent a lot of time getting RPATH to work well for OpenSim, so we can refer to what OpenSim does.
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.
I think I prefer the case B since I install the python binding in the Python site-package folder.
Unless it makes it incompatible with OpenSim, lets keep it as B :)
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.
Okay I pushed a change that fixed the RPATH to be absolute again.