-
Notifications
You must be signed in to change notification settings - Fork 203
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
add --search-path-cpp-headers
configuration option to control how EasyBuild sets paths to headers at build time
#4645
base: 5.0.x
Are you sure you want to change the base?
Conversation
… cpp-headers-search-path
…endency_cpp_headers method
…ependency_liker_paths and Toolchain._add_dependency_cpp_headers methods
What about
|
@Flamefire that's out of scope of this PR. This handles all supported options by CPP, which does not apply to Fortran. For Fortran we first need to check what is supported by the different Fortran preprocessors (gfortran for GNU and FPP for Intel) and probably it will need a different option in EB. |
Actually, after checking the docs, it turns out that the Fortran compilers in both GNU and Intel do support the same environment variables defined by CPP. So this PR already applies to Fortran as well:
|
Ok, I see. Only potential issue I see is that setting Also: How are existing entries handled? I.e. if Edit: That was supposed to be a reply to #4645 (comment) ;-) |
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
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.
Still some refinements of the new functions which I think are required to avoid subtile issues.
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
Co-authored-by: Alexander Grund <Flamefire@users.noreply.github.com>
…ser behaviour to extend
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.
Looks good to me. One (very) minor suggestion where I'm not sure. See the comment.
--search-path-cpp-headers
configuration option to control how EasyBuild sets paths to headers at build time
Partial fix for #3331
EasyBuild (at build time) currently handles paths to headers of dependencies provided by EB through
CPPFLAGS
. The result is that the compilation command gets additional options of the form-I/path/to/include
explicitly pointing the compiler to places with extra headers.The GCC prepocessor also supports the following environment variables that define the search paths for headers, which have lower precedence than
-I
command line options:(see https://gcc.gnu.org/onlinedocs/cpp/Environment-Variables.html#Environment-Variables-1)
This PR adds a new build option and toolchain option called
cpp-headers-search-path
to control how EasyBuild will handle paths to headers at build time:CPPFLAGS
and injecting-I/path/to/include
to compilation commandCPATH
environment variableC_INCLUDE_PATH
,CPLUS_INCLUDE_PATH
,OBJC_INCLUDE_PATH
independentlyNotes:
Toolchain._add_dependency_cpp_headers()
method (@migueldiascosta can you please check that this works on your side?)LDFLAGS
andCPPFLAGS
with newToolchain
methods in ACML toolchain