[CMake] Compaq Visual Fortran

Brad King brad.king at kitware.com
Thu Jan 28 08:27:41 EST 2010


Arjen Markus wrote:
> If you turn on the preprocessor option, then a number of macros
> are defined, the most useful being:
> 
> _DF_VERSION_=660 and _VF_VERSION_==660

Please try out the patch below (applies to CMake from CVS HEAD).
With it, CMake should recognize the Compaq compiler out of the box.
It won't know what flags to use without the compiler info files, but
at least it should report the compiler identification.  If that works
for you I'll commit it upstream.  Then we can work on the compiler
info files.

Thanks,
-Brad

diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 107470c..a9aec76 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -10,6 +10,8 @@
         PRINT *, 'INFO:compiler[G95]'
 #elif defined(__PATHSCALE__)
         PRINT *, 'INFO:compiler[PathScale]'
+#elif defined(_DF_VERSION_) || defined(_VF_VERSION_)
+        PRINT *, 'INFO:compiler[Compaq]'
 #elif defined(__GNUC__)
         PRINT *, 'INFO:compiler[GNU]'
 #elif defined(__IBMC__)


More information about the CMake mailing list