[CMake] Compaq Visual Fortran

Arjen Markus arjen.markus at deltares.nl
Tue Feb 2 07:10:14 EST 2010


Hi Brad,

I just tested the patch - Compaq Visual Fortran is recognised,
but not accepted - and added the Windows-f90.cmake file from the
PLplot project to CMake's Modules\Platform directory. Now the
compiler is accepted as well.

Note: I just saw there is already a Windows-df.cmake file in the
repository, but I guess "df.exe" is not used as the name for a
possible compiler.

Regards,

Arjen

On 2010-02-01 15:26, Brad King wrote:
> Arjen Markus wrote:
>> On 2010-01-28 17:18, Brad King wrote:
>>> Thanks.  Undo the previous patch and try the one below instead.
>>>
>> I applied the patch and it all worked fine. That is, CMake now
>> recognises the compiler but does not test it with the correct
>> compile flags (-o being reported as ambiguous). I can send the
>> error report if you want.
>>
>> At least we have a succesful first step.
> 
> Great.  I've committed the underlying compiler id method to
> CMake upstream, plus a test:
> 
> Add alternate per-vendor compiler id detection
> /cvsroot/CMake/CMake/Modules/CMakeDetermineCompilerId.cmake,v  <--  Modules/CMakeDetermineCompilerId.cmake
> new revision: 1.22; previous revision: 1.21
> /cvsroot/CMake/CMake/Tests/CMakeTests/CMakeLists.txt,v  <--  Tests/CMakeTests/CMakeLists.txt
> new revision: 1.26; previous revision: 1.25
> /cvsroot/CMake/CMake/Tests/CMakeTests/CompilerIdVendorTest.cmake.in,v  <--  Tests/CMakeTests/CompilerIdVendorTest.cmake.in
> new revision: 1.2; previous revision: 1.1
> 
> I did not yet commit the actual Compaq compiler entry.  That
> will be just the patch below.  Please try CMake HEAD from CVS
> plus the patch below.  Then add Compaq compiler support by
> creating a "Platform/Windows-Compaq-Fortran.cmake" file that
> sets the build rules and flags for that compiler.  Content will
> be similar to the Windows-f90.cmake file that Alan sent.
> 
> -Brad
> 
> diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
> index 44e45d8..0637d20 100644
> --- a/Modules/CMakeDetermineFortranCompiler.cmake
> +++ b/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)
> 
> 


More information about the CMake mailing list