-
Notifications
You must be signed in to change notification settings - Fork 18
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
Why are OpenMP flags and directories passed to external projects? #502
Comments
@rijobro had to add the capability to pass explicit OpenMP flags, as SIRF-SuperBuild/SuperBuild/External_parallelproj.cmake Lines 45 to 46 in 9fec2b9
Passing these variables isn't necessary on Linux nor Windows as far as I know. However, disabling that functionality seems like a bad idea. This seems independent however to adding variables to
I'm guessing that was a typo, and you meant I'm all in favour of removing the above So, I suggest to do the following:
|
see also #95 |
Actually, I take this comment back. So, it's better to pass the |
I am using the intel compiler and I cannot build for instance parallelproj with OpenMP because we are passing somehow the flags and libraries found to external project via these lines
This seems to prevent the project's own
find_package(OpenMP)
to set the variable it requires, probably becausefind_package
looks in the cache before executing. I get the a message that says that theOpenMP_iomp_LIBRARY
variable isn't set and the build of the external project fails at cmake configure time.The solution is to add
OpenMP_iomp_LIBRARY
to the variables inmark_as_superbuild
. However,OpenMP_iomp_LIBRARY
is a variable that has meaning only if one tries to build with the intel compiler, while the others seem to be applying to GCC. So, while adding the variable solves the issue, I don't think we should maintain such a list at all.Actually, removing the above code in
mark_as_advanced
mark_as_superbuild
makes it work as well.So the question is why do we pass such variables at all?
The text was updated successfully, but these errors were encountered: