[CMake] Compaq Visual Fortran

Brad King brad.king at kitware.com
Thu Jan 28 08:53:32 EST 2010


Arjen Markus wrote:
> it does not work - I get a message that the Fortran compiler
> identification is unknown. Does CMake run the compiler with the
> /fpp option? If not, then that is the cause (without there is
> no particular macro defined)

In CMakeDetermineFortranCompiler.cmake we list the possible flags
to try if it can't find a compiler id:

  SET(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS
    # Try compiling to an object file only.
    "-c"

    # Intel on windows does not preprocess by default.
    "-fpp"
    )

It should have tried -fpp.  Look in CMakeFiles/CMakeError.log
to see if it reports what happened.

Also, please try building the compiler id source by hand.
Copy "CMakeFortranCompilerId.F.in" and rename it to drop
the ".in" part.  Then run

  f90 -fpp CMakeFortranCompilerId.F

Please send me whatever files this produces.

Thanks,
-Brad


More information about the CMake mailing list