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 cmake offical FindMatlab and matlab_add_mex #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

congzhangzh
Copy link

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

find_package(IPP)
find_package(Framewave)
find_package(OpenMP)
find_package(CUDA)
Copy link
Owner

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?

Copy link
Author

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

Copy link
Owner

@leoliuf leoliuf left a 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)
Copy link
Owner

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.

Copy link
Author

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)

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.

2 participants