fcm
fcm copied to clipboard
fcm make: build: inheritance limitation: handling of include files
If a compiler or pre-processor searches for include files from the container directory of a source file before it does the paths specified by the -I
option, it may wrongly use the include file in an inherited build instead of the current one.
The detail of the problem is documented in the User Guide and referenced in the release notes. Simple test code is provided in the release to help check whether the problem exists with a particular compiler.
@dpmatthews has done a bit of work to investigate this further a few years back.
For Fortran includes:
-
ifort
does not work correctly. Howeverifort -assume nosource_include
works fine. -
gfortran
works fine. -
xlf95
on the IBM HPC works fine.
For CPP includes:
- Using the Fortran compiler to do the pre-processing does not work correctly with any of the compilers.
-
cpp
does not work correctly. - Using
cpp
taking its input fromstdin
works fine. This is potentially an easy solution but can we assume that the CPP tool will work in this way?