diff options
author | julie <julielangou@users.noreply.github.com> | 2016-01-20 15:45:15 +0000 |
---|---|---|
committer | julie <julielangou@users.noreply.github.com> | 2016-01-20 15:45:15 +0000 |
commit | cce5177e69c78b3db604161a2136c9d304801e21 (patch) | |
tree | e33e15f5352b7f6c8fb006a6ab3df637f36b0494 | |
parent | 3e0fca84a48689bc806729582537d3b699f25c6e (diff) |
Adding support to Compaq Compiler on Windows - Contribution from Davis Vowles sent on jan 20th 2016
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 254bcbce..a07cc358 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,33 @@ if (UNIX) STRING(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}") endif () +if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq" ) + if ( WIN32 ) + if (CMAKE_GENERATOR STREQUAL "NMake Makefiles") + get_filename_component(CMAKE_Fortran_COMPILER_CMDNAM ${CMAKE_Fortran_COMPILER} NAME_WE) + message(STATUS "Using Compaq Fortran compiler with command name ${CMAKE_Fortran_COMPILER_CMDNAM}") + set( cmd ${CMAKE_Fortran_COMPILER_CMDNAM} ) + string( TOLOWER "${cmd}" cmdlc ) + if ( cmdlc STREQUAL "df" ) + message(STATUS "Assume the Compaq Visual Fortran Compiler is being used") + set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1) + set(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_INCLUDES 1) + #This is a workaround that is needed to avoid forward-slashes in the + #filenames listed in response files from incorrectly being interpreted as + #introducing compiler command options + if (${BUILD_SHARED_LIBS}) + message(FATAL_ERROR "Making of shared libraries with CVF has not been tested.") + endif() + set(str "NMake version 9 or later should be used. NMake version 6.0 which is\n") + set(str "${str} included with the CVF distribution fails to build Lapack because\n") + set(str "${str} the number of source files exceeds the limit for NMake v6.0\n") + message(STATUS ${str}) + set(CMAKE_Fortran_LINK_EXECUTABLE "LINK /out:<TARGET> <LINK_FLAGS> <LINK_LIBRARIES> <OBJECTS>") + endif() + endif() + endif() +endif() + # Get Python find_package(PythonInterp) message(STATUS "Looking for Python found - ${PYTHONINTERP_FOUND}") |