diff options
author | julie <julielangou@users.noreply.github.com> | 2011-03-06 20:02:06 +0000 |
---|---|---|
committer | julie <julielangou@users.noreply.github.com> | 2011-03-06 20:02:06 +0000 |
commit | 8dcfef49b822700b4ac5b0b78ba7c573de8087dd (patch) | |
tree | 8a63659e1b2aefead655d92ff4e70a09d9c8700b /CMAKE | |
parent | b860077bc7317de1943efb058df48de0bddcab7c (diff) | |
download | lapack-8dcfef49b822700b4ac5b0b78ba7c573de8087dd.tar.gz lapack-8dcfef49b822700b4ac5b0b78ba7c573de8087dd.tar.bz2 lapack-8dcfef49b822700b4ac5b0b78ba7c573de8087dd.zip |
Added compiler options needed for HP Fortran
- Chuck Atkins (Kitware)
Diffstat (limited to 'CMAKE')
-rw-r--r-- | CMAKE/CheckLAPACKCompilerFlags.cmake | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/CMAKE/CheckLAPACKCompilerFlags.cmake b/CMAKE/CheckLAPACKCompilerFlags.cmake index d22f824d..77026a66 100644 --- a/CMAKE/CheckLAPACKCompilerFlags.cmake +++ b/CMAKE/CheckLAPACKCompilerFlags.cmake @@ -50,6 +50,27 @@ elseif( (CMAKE_Fortran_COMPILER_ID STREQUAL "VisualAge" ) OR # CMake 2.6 CACHE STRING "Flags for Fortran compiler." FORCE ) endif() +# HP Fortran +elseif( CMAKE_Fortran_COMPILER_ID STREQUAL "HP" ) + if( "${CMAKE_Fortran_FLAGS}" MATCHES "\\+fp_exception" ) + set( FPE_EXIT TRUE ) + endif() + + if( NOT ("${CMAKE_Fortran_FLAGS}" MATCHES "\\+fltconst_strict") ) + message( STATUS "Enabling strict float conversion with +fltconst_strict" ) + set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} +fltconst_strict" + CACHE STRING "Flags for Fortran compiler." FORCE ) + endif() + + # Most versions of cmake don't have good default options for the HP compiler + set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -g" + CACHE STRING "Flags used by the compiler during debug builds" FORCE ) + set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_MINSIZEREL} +Osize" + CACHE STRING "Flags used by the compiler during release minsize builds" FORCE ) + set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_RELEASE} +O2" + CACHE STRING "Flags used by the compiler during release builds" FORCE ) + set( CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO} +O2 -g" + CACHE STRING "Flags used by the compiler during release with debug info builds" FORCE ) else() endif() |