This commit is contained in:
Radovan Bast 2015-08-04 11:44:39 +02:00
parent cc69b40fe2
commit 792b66f037
3 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,7 @@
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
# remove -rdynamic flag offensive to PGI Fortran
# we remove -rdynamic flag added by CMake
# PGI Fortran does not recognize this flag
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
endif()
add_executable(example example.f90 module.f90)

View File

@ -1,7 +1,7 @@
if(BLAS_FOUND)
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
# remove -rdynamic flag offensive to PGI Fortran
# we remove -rdynamic flag added by CMake
# PGI Fortran does not recognize this flag
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
endif()

View File

@ -1,10 +1,12 @@
if(LAPACK_FOUND)
if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
# remove -rdynamic flag offensive for PGI Fortran
set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
# we remove -rdynamic flag added by CMake
# PGI Fortran does not recognize this flag
SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS)
endif()
add_executable(example example.F90)
target_link_libraries(example ${MATH_LIBS})
else()
message(FATAL_ERROR "LAPACK/BLAS libraries not found for the test fc_lapack!")
message(FATAL_ERROR "LAPACK library not found for the test fc_lapack!")
endif()