Commit 318cf5bf authored by Florent Pruvost's avatar Florent Pruvost
Browse files

add gcc flag --no-as-needed only if gnu and Linux

parent ed1bd46a
...@@ -307,7 +307,10 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") ...@@ -307,7 +307,10 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
set(BLAS_SEARCH_LIBS "") set(BLAS_SEARCH_LIBS "")
set(additional_flags "")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(additional_flags "-Wl,--no-as-needed") set(additional_flags "-Wl,--no-as-needed")
endif()
if(BLA_F95) if(BLA_F95)
......
...@@ -373,8 +373,10 @@ if( NOT FFTW_FOUND ) ...@@ -373,8 +373,10 @@ if( NOT FFTW_FOUND )
# MKL # MKL
if(FFTW_LOOK_FOR_MKL) if(FFTW_LOOK_FOR_MKL)
list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT};-lm") list(APPEND REQUIRED_LIBS "${CMAKE_THREAD_LIBS_INIT};-lm")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND REQUIRED_LDFLAGS "-Wl,--no-as-needed") list(APPEND REQUIRED_LDFLAGS "-Wl,--no-as-needed")
endif() endif()
endif()
# set required libraries for link # set required libraries for link
set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}") set(CMAKE_REQUIRED_INCLUDES "${REQUIRED_INCDIRS}")
......
...@@ -366,7 +366,10 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") ...@@ -366,7 +366,10 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
set(LAPACK_SEARCH_LIBS "") set(LAPACK_SEARCH_LIBS "")
set(additional_flags "")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(additional_flags "-Wl,--no-as-needed") set(additional_flags "-Wl,--no-as-needed")
endif()
if (BLA_F95) if (BLA_F95)
set(LAPACK_mkl_SEARCH_SYMBOL "CHEEV") set(LAPACK_mkl_SEARCH_SYMBOL "CHEEV")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment