STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}")
STRING(REPLACE "," "" _flag_name "${_flag_name}")
STRING(REPLACE "--" "__" _flag_name "${_flag_name}")
- ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${_flag_stripped}")
+ SET(_backup ${CMAKE_REQUIRED_LIBRARIES})
+ SET(CMAKE_REQUIRED_LIBRARIES "${_flag_stripped}")
CHECK_CXX_COMPILER_FLAG(
""
DEAL_II_HAVE_FLAG_${_flag_name}
)
- STRIP_FLAG(CMAKE_REQUIRED_FLAGS "${_flag_stripped}")
+ SET(CMAKE_REQUIRED_LIBRARIES ${_backup})
+
IF(DEAL_II_HAVE_FLAG_${_flag_name})
SET(${_variable} "${${_variable}} ${_flag_stripped}")
STRING(STRIP "${${_variable}}" ${_variable})
# Check whether the -as-needed flag is available. If so set it to link
# the deal.II library with it.
#
-# TODO: Disabled until ENABLE_IF_LINKS is properly implemented
-#ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
#
# Check whether the -as-needed flag is available. If so set it to link
# the deal.II library with it.
#
-# TODO: Disabled until ENABLE_IF_LINKS is properly implemented
-#ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
#
# Set ansi mode:
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams