-
Notifications
You must be signed in to change notification settings - Fork 4
make instaling vapaa easier #55
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
base: main
Are you sure you want to change the base?
Conversation
You're not detecting MPICH except via Cray compiler. Is that prudent? |
Oh good point, that should be simple to address thanks. |
oh actually those flags are based on the make.inc.xyz files so I didn't try to do any fancy detecting; I'll try to get it to work so that it does pick it up! |
I get the error:
The location of the header has to be passed manually to the C compiler in case of NAG; see my comment here (#49 (comment)). Assuming a variable
|
I need to get access to this compiler so I can test myself. Thank this is easy to address |
I managed to bypass the error with this ugly CMake logic,
Probably some cleaner CMake commands exist. Edit: with these changes it builds 🎉
|
target_compile_options(${vapa_lib} PRIVATE -Wall -Wextra -fPIE) | ||
target_compile_definitions(${vapa_lib} PRIVATE -DHAVE_CFI ${FLAG_MPI}) | ||
target_link_libraries(${vapa_lib} PRIVATE MPI::MPI_C) | ||
set(WARNFLAGS "-Wall -Wextra -fPIE") |
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.
-Wall -Wextra
aren't valid for the Intel compilers AFAIK.
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 would not add extra warning flags. People can add them if they want, or we can use them in CI, but otherwise any non-standard flags are often just causing trouble when building on strange systems. (All HPC systems are strange snowflakes.) Even -fPIE
should be handled automatically by cmake if it's building a shared library.
For example, I will want to cross-build this library on a x86-64 musl host for mingw 32-bit Windows. The respective mechanisms for shared libraries are different there, but since cmake already knows how to do that, just using the standard cmake mechanisms is best.
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.
Yeah, warn flags in CI are good. We shouldn't enable in release builds.
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.
Agreed, I shall fix this up :) I can probably create a small CI that runs on GIthub actions too
…at don't support it
I have access but it will be a while before I have time to test. I'm on vacation until August. |
Enjoy your holiday! |
This makes the code easier to consume inside another cmake project.