Browse Source

Recognize the Compaq Fortran compiler

The compiler documents symbols _DF_VERSION_ and _VF_VERSION_ but they do
not seem to be available to the preprocessor.  Instead we add a vendor
query table entry for Compaq.  Running "f90 -what" produces

  Compaq Visual Fortran Optimizing Compiler Version ...

This clearly identifies the compiler.
Brad King 16 years ago
parent
commit
11dcef910a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Modules/CMakeDetermineFortranCompiler.cmake

+ 5 - 0
Modules/CMakeDetermineFortranCompiler.cmake

@@ -162,6 +162,11 @@ IF(NOT CMAKE_Fortran_COMPILER_ID_RUN)
     "-fpp"
     )
 
+  # Table of per-vendor compiler id flags with expected output.
+  LIST(APPEND CMAKE_Fortran_COMPILER_ID_VENDORS Compaq)
+  SET(CMAKE_Fortran_COMPILER_ID_VENDOR_FLAGS_Compaq "-what")
+  SET(CMAKE_Fortran_COMPILER_ID_VENDOR_REGEX_Compaq "Compaq Visual Fortran")
+
   # Try to identify the compiler.
   SET(CMAKE_Fortran_COMPILER_ID)
   INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)