fcm icon indicating copy to clipboard operation
fcm copied to clipboard

fcm make: build: inheritance limitation: handling of include files

Open matthewrmshin opened this issue 11 years ago • 0 comments

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. However ifort -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 from stdin works fine. This is potentially an easy solution but can we assume that the CPP tool will work in this way?

matthewrmshin avatar Jul 08 '13 13:07 matthewrmshin