-
Notifications
You must be signed in to change notification settings - Fork 64
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 cmake offical FindMatlab and matlab_add_mex #16
base: master
Are you sure you want to change the base?
Conversation
find_package(IPP) | ||
find_package(Framewave) | ||
find_package(OpenMP) | ||
find_package(CUDA) |
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 noticed you comment CUDA. Did you test CPU-only mode?
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.
maybe, I am not sure, it seems this line should not be deleted
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.
Please see my comment and thank for you help
cmake_minimum_required(VERSION 2.8) | ||
project(MRiLab) | ||
|
||
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}) | ||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) |
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.
./cmake folder has not only FindMatlab.cmake but also files for IPP, Framewave etc.
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 agree with you, I should keep this line,
and combine ${CMAKE_SOURCE_DIR}/cmake with old CMAKE_MODULE_PATH like,
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH } ${CMAKE_SOURCE_DIR}/cmake)
or
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
cmake offical provide FindMatlab module now, and matlab_add_mex works great!
when combine with microsoft vcpkg, it's really easy to compile the mex part under windows.
ref:
https://github.com/Microsoft/vcpkg
https://github.com/Microsoft/vcpkg/blob/master/docs/users/integration.md