Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

DEC$ directive to stop compilation

meistrv
Beginner
881 Views

Hello,

I use the IVF DEC$ directives for conditional compilation (I would use the C preprocessor only, but it does not work in include files and I don't want to change all the includes to #includes atm.).

Is there a possibility to stop compilation with IVF preprocessor? Something equivalent to the #error C preprocessor directive? I haven't found anything like this in the list of DEC$ directives in IVF. Or maybe some workaround?

Thanks for any suggestion

Best Regards

Vit

0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
881 Views

I haven't tried this:

(in conditional compile section)
INCLUDE "CON:"

Then abort the build by hand.

A bit clumbsy..

Jim Dempsey

0 Kudos
TimP
Honored Contributor III
881 Views
By the way, if you use #error it won't work with all compilers (e.g. it will fail with Oracle compilers).
At the cost of some additional Makefile machinery, you could pre-process your INCLUDE files before you reach the INCLUDE compile step.
0 Kudos
Reply