Hello,

for whatever it is worth, C-style preprocessor commands
are a non-standard feature. The Fortran standard itself
defines only the "INCLUDE" statement (or directive).
Perhaps you can solve this in a standard way by moving the
logic to the CMakeLists.txt files rather than relying
on (possibly ubiquitous but still non-standard) support
of these C preprocessor commands.

Regards,

Arjen

On Tue, 28 Feb 2012 13:28:19 -0500
 Brad King <[email protected]> wrote:
On 2/28/2012 11:06 AM, Dirk vanMeeuwen wrote:
#include "fpp-Windows-definition.inc"
MODULE MSG
...
END MODULE

However, when this module MSG is used, the project build order
> generated by CMake is not correct (see attached small example).

Fortran dependencies are supported, and the Intel Fortran 12 compiler
is expected to work with the NMake Makefiles generator.

I was able to reproduce the problem. If I remove the #if logic from the .inc file then it works. I think this may be a bug in the Source/cmDependsFortran* files of CMake. It is not handling the #if logic correctly and tricks itself into thinking that all the code after the #include line is being preprocessed out as if in "#if 0".
That's why the order of the lines affects the results.

I don't have time to investigate this myself but if anyone is interested then take a look at Source/cmDependsFortranParser.y and Source/cmDependsFortran.cxx for use of the _RuleIf, _RuleElse,
and similar functions.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake





DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.




--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to