I have a project with some 300 FORTRAN and ca. 40 C-source files. I use the pgfortran compilers. while most of the FORTRAN files can be compiled with the same options, for a few (ca. 15) loop-unrolling and optimization must be switched off. Also, compilation of the C-files needs different defines on the command line.
My solution is to make the C-files into a different project that produces a library that is then linked within the fortran project. The fortran files with the different options i must compile manually, and then shift the object files into the project before linking.
I wonder whether there is a more elegant way of doing this, e.g. setting different compiler options for different sets of sources. Is this possible?
best regards, Bernhard