HAVE_GLIBC_STACKTRACE)
IF(HAVE_GLIBC_STACKTRACE AND NOT DEAL_II_STATIC_EXECUTABLE)
- ENABLE_IF_SUPPORTED(CMAKE_SHARED_LINKER_FLAGS "-rdynamic")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-rdynamic")
ENDIF()
#
# TODO: MM: Check whether this is still necessary...
#
- STRIP_FLAG(CMAKE_SHARED_LINKER_FLAGS "-rdynamic")
+ STRIP_FLAG(DEAL_II_LINKER_FLAGS "-rdynamic")
ENDIF()
# - Matthias Maier, 2012
#
STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
- STRIP_FLAG(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
+ STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-ggdb")
STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-g")
- STRIP_FLAG(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
+ STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-g")
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
# Set up our linker flags:
#
SET(MAKEFILE_LDFLAGS_${build}
- "${CMAKE_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${CMAKE_SHARED_LINKER_FLAGS} ${DEAL_II_SHARED_LINKER_FLAGS_${build}}"
+ "${CMAKE_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}} ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${build}}"
)
ENDFOREACH()
SET(DEAL_II_CXX_FLAGS_RELEASE "@DEAL_II_CXX_FLAGS_RELEASE@")
# used for all targets:
-SET(DEAL_II_LINKER_FLAGS "@CMAKE_SHARED_LINKER_FLAGS@")
+SET(DEAL_II_LINKER_FLAGS "@DEAL_II_LINKER_FLAGS@")
# _additionally_ used for debug targets:
-SET(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_SHARED_LINKER_FLAGS_DEBUG@")
+SET(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_LINKER_FLAGS_DEBUG@")
# _additionally_ used for release targets:
-SET(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_SHARED_LINKER_FLAGS_RELEASE@")
+SET(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_LINKER_FLAGS_RELEASE@")
# used for all targets:
SET(DEAL_II_USER_DEFINITIONS "@DEAL_II_USER_DEFINITIONS@")
MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL)
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES})
CHECK_FOR_LAPACK_FUNCTIONS()
MACRO(FEATURE_MPI_CONFIGURE_EXTERNAL)
ADD_FLAGS(CMAKE_CXX_FLAGS "${MPI_CXX_COMPILE_FLAGS}")
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MPI_CXX_LIBRARIES})
INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
ENDIF()
ENDIF()
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${CMAKE_THREAD_LIBS_INIT}")
#
# Set up some posix thread specific configuration toggles:
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${${_feature}_LIBRARIES})
ENDIF()
IF(DEFINED ${_feature}_LINKER_FLAGS)
- ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${${_feature}_LINKER_FLAGS}")
+ ADD_FLAGS(DEAL_II_LINKER_FLAGS "${${_feature}_LINKER_FLAGS}")
ENDIF()
ENDMACRO()
# build type specified in DEAL_II_BUILD_TYPES
#
# It is assumed that the desired compilation configuration is set via
-# DEAL_II_SHARED_LINKER_FLAGS_${build}
+# DEAL_II_LINKER_FLAGS_${build}
# DEAL_II_CXX_FLAGS_${build}
# DEAL_II_DEFINITIONS_${build}
#
# as well as the global (for all build types)
-# CMAKE_SHARED_LINKER_FLAGS
+# DEAL_II_LINKER_FLAGS
# CMAKE_CXX_FLAGS
# DEAL_II_DEFINITIONS
#
)
SET_TARGET_PROPERTIES(${_library}.${_build_lowercase} PROPERTIES
- LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${_build}}"
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS};${DEAL_II_LINKER_FLAGS_${_build}}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
LINKER_LANGUAGE "CXX"
TARGET_LINK_LIBRARIES(report_features ${DEAL_II_EXTERNAL_LIBRARIES})
SET_TARGET_PROPERTIES(report_features
PROPERTIES
- LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}"
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS}"
)
# CMAKE_INSTALL_RPATH_USE_LINK_PATH
# CMAKE_C_FLAGS *)
# CMAKE_CXX_FLAGS *)
-# CMAKE_SHARED_LINKER_FLAGS *)
+# DEAL_II_LINKER_FLAGS *)
# DEAL_II_CXX_FLAGS_DEBUG
-# DEAL_II_SHARED_LINKER_FLAGS_DEBUG
+# DEAL_II_LINKER_FLAGS_DEBUG
# DEAL_II_CXX_FLAGS_RELEASE
-# DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+# DEAL_II_LINKER_FLAGS_RELEASE
# DEAL_II_WITH_64BIT_INDICES
#
# *) May also be set via environment variable (CFLAGS, CXXFLAGS, LDFLAGS)
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_CXX_FLAGS
DEAL_II_CXX_FLAGS_DEBUG
DEAL_II_CXX_FLAGS_RELEASE
- CMAKE_SHARED_LINKER_FLAGS
- DEAL_II_SHARED_LINKER_FLAGS_DEBUG
- DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+ DEAL_II_LINKER_FLAGS
+ DEAL_II_LINKER_FLAGS_DEBUG
+ DEAL_II_LINKER_FLAGS_RELEASE
)
FOREACH(_flag ${DEAL_II_USED_FLAGS})
#
SET(CMAKE_C_FLAGS_SAVED "$ENV{CFLAGS} ${CMAKE_C_FLAGS_SAVED}")
SET(CMAKE_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_SAVED}")
-SET(CMAKE_SHARED_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS_SAVED}")
+SET(DEAL_II_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${DEAL_II_LINKER_FLAGS_SAVED}")
UNSET(ENV{CFLAGS})
UNSET(ENV{CXXFLAGS})
UNSET(ENV{LDFLAGS})
# CMAKE_CXX_FLAGS
# DEAL_II_CXX_FLAGS_DEBUG
# DEAL_II_CXX_FLAGS_RELEASE
-# CMAKE_SHARED_LINKER_FLAGS
-# DEAL_II_SHARED_LINKER_FLAGS_DEBUG
-# DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+# DEAL_II_LINKER_FLAGS
+# DEAL_II_LINKER_FLAGS_DEBUG
+# DEAL_II_LINKER_FLAGS_RELEASE
#
# All modifications shall be guarded with the ENABLE_IF_SUPPORTED
# or ENABLE_IF_LINKS macro, e.g.
#
# ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
-# ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+# ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Checks for compiler features (such as C++11 support) and compiler
# specific bugs that
# Check whether the -as-needed flag is available. If so set it to link
# the deal.II library with it.
#
-ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Setup various warnings:
# To produce a static executable, we have to statically link libstdc++
# and gcc's support libraries and glibc:
#
- # (Well... the name "CMAKE_SHARED_LINKER_FLAGS" is a bit misleading :-])
+ # (Well... the name "DEAL_II_LINKER_FLAGS" is a bit misleading :-])
#
- ENABLE_IF_SUPPORTED(CMAKE_SHARED_LINKER_FLAGS "-static")
- ENABLE_IF_SUPPORTED(CMAKE_SHARED_LINKER_FLAGS "-pthread")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-static")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS "-pthread")
ENDIF()
ENDIF()
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
- ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-ggdb")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-ggdb")
#
# If -ggdb is not available, fall back to -g:
#
IF(NOT DEAL_II_HAVE_FLAG_ggdb)
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS_DEBUG "-g")
- ENABLE_IF_SUPPORTED(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "-g")
+ ENABLE_IF_SUPPORTED(DEAL_II_LINKER_FLAGS_DEBUG "-g")
ENDIF()
ENDIF()
# Check whether the -as-needed flag is available. If so set it to link
# the deal.II library with it.
#
-ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Set ansi mode:
)
IF(CMAKE_CROSSCOMPILING)
_both(
- "# CROSSCOMPILING!\n"
+ "#\n# CROSSCOMPILING!\n"
"# DEAL_II_NATIVE: ${DEAL_II_NATIVE}\n"
)
ENDIF()
+IF(DEAL_II_STATIC_EXECUTABLE)
+ _both(
+ "#\n# STATIC LINKAGE!\n"
+ )
+ENDIF()
+
_both("#\n")
_detailed(
"# Compiler flags used for this build:
-# CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
+# CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
"
)
IF(CMAKE_BUILD_TYPE MATCHES "Release")
- _detailed("# DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}\n")
+ _detailed("# DEAL_II_CXX_FLAGS_RELEASE: ${DEAL_II_CXX_FLAGS_RELEASE}\n")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- _detailed("# DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}\n")
+ _detailed("# DEAL_II_CXX_FLAGS_DEBUG: ${DEAL_II_CXX_FLAGS_DEBUG}\n")
ENDIF()
-_detailed("# CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}\n")
+_detailed("# DEAL_II_LINKER_FLAGS: ${DEAL_II_LINKER_FLAGS}\n")
IF(CMAKE_BUILD_TYPE MATCHES "Release")
- _detailed("# DEAL_II_SHARED_LINKER_FLAGS_RELEASE: ${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}\n")
+ _detailed("# DEAL_II_LINKER_FLAGS_RELEASE: ${DEAL_II_LINKER_FLAGS_RELEASE}\n")
ENDIF()
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- _detailed("# DEAL_II_SHARED_LINKER_FLAGS_DEBUG: ${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}\n")
+ _detailed("# DEAL_II_LINKER_FLAGS_DEBUG: ${DEAL_II_LINKER_FLAGS_DEBUG}\n")
ENDIF()
_detailed("#\n")
# "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_CXX_FLAGS_RELEASE variable"
# )
#
-# SET(CMAKE_SHARED_LINKER_FLAGS "" CACHE STRING
-# "The user supplied cache variable will be appended _at the end_ of the auto generated CMAKE_SHARED_LINKER_FLAGS variable"
+# SET(DEAL_II_LINKER_FLAGS "" CACHE STRING
+# "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_LINKER_FLAGS variable"
# )
#
-# SET(DEAL_II_SHARED_LINKER_FLAGS_DEBUG "" CACHE STRING
-# "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_SHARED_LINKER_FLAGS_DEBUG variable"
+# SET(DEAL_II_LINKER_FLAGS_DEBUG "" CACHE STRING
+# "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_LINKER_FLAGS_DEBUG variable"
# )
#
-# SET(DEAL_II_SHARED_LINKER_FLAGS_RELEASE "" CACHE STRING
-# "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_SHARED_LINKER_FLAGS_RELEASE variable"
+# SET(DEAL_II_LINKER_FLAGS_RELEASE "" CACHE STRING
+# "The user supplied cache variable will be appended _at the end_ of the auto generated DEAL_II_LINKER_FLAGS_RELEASE variable"
# )
#
# OPTION(DEAL_II_STATIC_EXECUTABLE "ON" CACHE BOOL
PROPERTIES
VERSION ${VERSION}
SOVERSION ${VERSION}
- LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${build}}"
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS_${build}}"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}"
)
# CMAKE_CXX_FLAGS
# DEAL_II_CXX_FLAGS_DEBUG
# DEAL_II_CXX_FLAGS_RELEASE
- # CMAKE_SHARED_LINKER_FLAGS
- # DEAL_II_SHARED_LINKER_FLAGS_DEBUG
- # DEAL_II_SHARED_LINKER_FLAGS_RELEASE
+ # DEAL_II_LINKER_FLAGS
+ # DEAL_II_LINKER_FLAGS_DEBUG
+ # DEAL_II_LINKER_FLAGS_RELEASE
#
# All modifications shall be guarded with the ENABLE_IF_SUPPORTED
# or ENABLE_IF_LINKS macro, e.g.
#
# ENABLE_IF_SUPPORTED(CMAKE_CXX_FLAGS "-fpic")
- # ENABLE_IF_LINKS(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+ # ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--as-needed")
#
# Compiler flags for platform dependent optimization (such as
# -march=native) must always be guarded with
<li>
For internal use, for setting necessary linker flags for the deal.II library:
<ul>
- <li> <code>CMAKE_SHARED_LINKER_FLAGS</code>
- <li> <code>DEAL_II_SHARED_LINKER_FLAGS_DEBUG</code>
- <li> <code>DEAL_II_SHARED_LINKER_FLAGS_RELEASE</code>
+ <li> <code>DEAL_II_LINKER_FLAGS</code>
+ <li> <code>DEAL_II_LINKER_FLAGS_DEBUG</code>
+ <li> <code>DEAL_II_LINKER_FLAGS_RELEASE</code>
</ul>
<li>