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 OpenMP_<lang>_INCLUDE_DIR as opposed to OPENMP_INCLUDE_DIRS #872

Merged
merged 2 commits into from
Mar 9, 2024

Conversation

KrisThielemans
Copy link
Member

Necessary on MacOS.

Fixes #870

@KrisThielemans
Copy link
Member Author

@francescaleek, could you give this a go?

First find out where your omp.h is (not sure how to do that on a Mac), most likely /usr/local/include, then do something like this for an existing build

cd SIRF-SuperBuild
git remote add kris https://github.com/KrisThielemans/SIRF-SuperBuild.git
git fetch kris
git checkout OpenMP_fixes
cd ../build
cmake -DOpenMP_CXX_INCLUDE_DIR:PATH=/usr/local/include -DOpenMP_C_INCLUDE_DIR:PATH=/usr/local/include .
make -j4

you'd have to reenable parallelproj and NiftyReg OpenMP to see of course.

If you have a working build already, you could copy all of that first, such that you don't screw it up.

It's not urgent to test this, but if you can and it works, then we'll include it in the imminent release.

@KrisThielemans
Copy link
Member Author

This seems to have worked mostly for @francescaleek, except for NiftyReg. I've created KCL-BMEIS/niftyreg#110. We could update version_config.cmake to point to that branch, or presumably set in External_NIFTYREG.cmake

set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS} -I${OpenMP_C_INCLUDE_DIRS")
set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS} -I${OpenMP_CXX_INCLUDE_DIRS")

maybe pointing to a correct version is best. @paskino @casperdcl any opinion?

@KrisThielemans
Copy link
Member Author

@francescaleek, the NiftyReg fix has been merged, so can you try again with

cmake -DOpenMP_CXX_INCLUDE_DIR:PATH=/usr/local/include -DOpenMP_C_INCLUDE_DIR:PATH=/usr/local/include -DIFTYREG_TAG:STRING=a328efb3a2f8ea4b47cf0f7b581d983a570a1ffd .
make -j4

Hopefully this does the trick...

@KrisThielemans KrisThielemans merged commit 90d9f88 into SyneRBI:master Mar 9, 2024
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.

parallelproj build failed on OSX due to omp.h not found
1 participant