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

Remove vendored FindMatlab.cmake #1147

Merged
merged 3 commits into from
Jan 21, 2024
Merged

Remove vendored FindMatlab.cmake #1147

merged 3 commits into from
Jan 21, 2024

Conversation

traversaro
Copy link
Member

As all the required custom logic was merged in CMake 3.24, see robotology/robotology-superbuild#1044 (comment) .

As all the required custom logic was merged in CMake 3.24, see robotology/robotology-superbuild#1044 (comment) .
@traversaro
Copy link
Member Author

Build fails on Ubuntu with apt dependencies with error:

CMake Error at /usr/share/cmake-3.16/Modules/FindMatlab.cmake:1021 (add_library):
  Cannot find source file:

    NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

That make sense, as older CMake do not know what to do with this option, and think it is a source file instead.

@traversaro
Copy link
Member Author

Build fails on Ubuntu with apt dependencies with error:

CMake Error at /usr/share/cmake-3.16/Modules/FindMatlab.cmake:1021 (add_library):
  Cannot find source file:

    NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

That make sense, as older CMake do not know what to do with this option, and think it is a source file instead.

In 5b14811 tried to just put the option before the SRC list, but this does not work as even unparsed arguments are passed to matlab_add_mex. So the only thing to do is to add an if based on the CMake version.

@traversaro
Copy link
Member Author

Build fails on Ubuntu with apt dependencies with error:

CMake Error at /usr/share/cmake-3.16/Modules/FindMatlab.cmake:1021 (add_library):
  Cannot find source file:

    NO_IMPLICIT_LINK_TO_MATLAB_LIBRARIES

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx

That make sense, as older CMake do not know what to do with this option, and think it is a source file instead.

In 5b14811 tried to just put the option before the SRC list, but this does not work as even unparsed arguments are passed to matlab_add_mex. So the only thing to do is to add an if based on the CMake version.

This worked fine, let's merge.

@traversaro traversaro merged commit 4098bee into master Jan 21, 2024
37 checks passed
@traversaro traversaro deleted the traversaro-patch-6 branch January 21, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant