]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Remove DEAL_II_STATIC_EXECUTABLE configure option
authorMatthias Maier <tamiko@43-1.org>
Sat, 3 Dec 2022 04:11:13 +0000 (22:11 -0600)
committerMatthias Maier <tamiko@43-1.org>
Sat, 3 Dec 2022 04:34:01 +0000 (22:34 -0600)
cmake/checks/check_02_compiler_features.cmake
cmake/config/Config.cmake.in
cmake/macros/macro_deal_ii_setup_target.cmake
cmake/macros/macro_switch_library_preference.cmake
cmake/setup_cached_variables.cmake
cmake/setup_compiler_flags_gnu.cmake
cmake/setup_compiler_flags_intel.cmake
cmake/setup_write_config.cmake
doc/users/cmake_dealii.html
doc/users/cmake_user.html
doc/users/config.sample

index c3a112afe55a3737fe6627aebb7d0cab5f9201bb..39e6c3f52ea98fcd2a15df695f11399c51f8f46e 100644 (file)
@@ -141,7 +141,7 @@ CHECK_CXX_SOURCE_COMPILES(
   "
   DEAL_II_HAVE_GLIBC_STACKTRACE)
 
-if(DEAL_II_HAVE_GLIBC_STACKTRACE AND NOT DEAL_II_STATIC_EXECUTABLE)
+if(DEAL_II_HAVE_GLIBC_STACKTRACE)
   enable_if_links(DEAL_II_LINKER_FLAGS "-rdynamic")
 endif()
 
index 1dca5d105c3c1516335a8381c16de6d88ef5a31a..352ac3cbdb24d76de15d68bd9c28c9f3634b1fd3 100644 (file)
@@ -152,13 +152,6 @@ set(DEAL_II_MPIEXEC_NUMPROC_FLAG "@MPIEXEC_NUMPROC_FLAG@")
 set(DEAL_II_MPIEXEC_PREFLAGS "@MPIEXEC_PREFLAGS@")
 set(DEAL_II_MPIEXEC_POSTFLAGS "@MPIEXEC_POSTFLAGS@")
 
-#
-# Build a static executable:
-#
-
-set(DEAL_II_STATIC_EXECUTABLE "@DEAL_II_STATIC_EXECUTABLE@")
-
-
 #
 # Information about include directories and libraries
 #
index 89d4014e3e13834413cc154a700b347b6a2214a2..3b331f302628a164213fb1e3638b241f9fb197e1 100644 (file)
@@ -144,14 +144,4 @@ macro(deal_ii_setup_target _target)
     target_link_libraries(${_target} ${DEAL_II_TARGET_${_build}})
   endif()
 
-  #
-  # If DEAL_II_STATIC_EXECUTABLE is set, switch the final link type to
-  # static:
-  #
-  if(DEAL_II_STATIC_EXECUTABLE)
-    set_property(TARGET ${_target} PROPERTY
-      LINK_SEARCH_END_STATIC TRUE
-      )
-  endif()
-
 endmacro()
index 9b2dbe9551e6888c5f410c86e5dccd6b4d2c36cd..4070caca69cc8c7fde189eff443067bb04a1dd5e 100644 (file)
 
 #
 # This macro toggles the preference for static/shared libraries if
-# DEAL_II_PREFER_STATIC_LIBS=TRUE but the final executable will still be
-# dynamically linked, i.e. DEAL_II_STATIC_EXECUTABLE=OFF
+# DEAL_II_PREFER_STATIC_LIBS=TRUE.
 #
 # Usage:
 #     switch_library_preference()
 #
 
 macro(switch_library_preference)
-  if(DEAL_II_PREFER_STATIC_LIBS AND NOT DEAL_II_STATIC_EXECUTABLE)
+  if(DEAL_II_PREFER_STATIC_LIBS)
     #
     # Invert the search order for libraries when DEAL_II_PREFER_STATIC_LIBS
     # is set. This will prefer static archives instead of shared libraries:
index 91a58bd8b6f7d1026d97783709bbcb73b1166cff..e3c2a551215d39a74ea4ff80705ff7406cba89d7 100644 (file)
@@ -37,7 +37,6 @@
 #     DEAL_II_EARLY_DEPRECATIONS
 #     BUILD_SHARED_LIBS
 #     DEAL_II_PREFER_STATIC_LIBS
-#     DEAL_II_STATIC_EXECUTABLE
 #     CMAKE_INSTALL_RPATH_USE_LINK_PATH
 #     DEAL_II_CXX_FLAGS                    *)
 #     DEAL_II_CXX_FLAGS_DEBUG
@@ -178,23 +177,6 @@ option(DEAL_II_PREFER_STATIC_LIBS
   )
 mark_as_advanced(DEAL_II_PREFER_STATIC_LIBS)
 
-option(DEAL_II_STATIC_EXECUTABLE
-  "Provide a link interface that is suitable for static linkage of executables. Enabling this option forces BUILD_SHARED_LIBS=OFF and DEAL_II_PREFER_STATIC_LIBS=ON"
-  OFF
-  )
-mark_as_advanced(DEAL_II_STATIC_EXECUTABLE)
-
-if(DEAL_II_STATIC_EXECUTABLE)
-  set(BUILD_SHARED_LIBS "OFF" CACHE BOOL
-    "Build a shared library"
-    FORCE
-    )
-  set(DEAL_II_PREFER_STATIC_LIBS "ON" CACHE BOOL
-    "Prefer static libraries over dynamic libraries when searching for features and corresponding link interface"
-    FORCE
-    )
-endif()
-
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE BOOL
   "Set the rpath of the library to the external link paths on installation"
   )
index 72b6a2d6c18785fc2704b4b3c949b1cfa365a969..08e141fa1e05e6e5fa6cf92c103b3db403aa47bd 100644 (file)
@@ -168,16 +168,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 endif()
 
 
-if(DEAL_II_STATIC_EXECUTABLE)
-  #
-  # To produce a static executable, we have to statically link libstdc++
-  # and gcc's support libraries and glibc:
-  #
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-static")
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-pthread")
-endif()
-
-
 #############################
 #                           #
 #    For Release target:    #
index 9b761091b50c1ad30271d0379861f27cac380c52..0b7d70c4b2ed1fe0e864558b78c458a2e4f57504 100644 (file)
@@ -147,23 +147,6 @@ enable_if_supported(DEAL_II_CXX_FLAGS "-wd186")
 enable_if_supported(DEAL_II_CXX_FLAGS "-wd280")
 
 
-if(DEAL_II_STATIC_EXECUTABLE)
-  #
-  # To produce a static executable, we have to statically link intel's
-  # support libraries:
-  #
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-static")
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-static-intel")
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-static-gcc")
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-pthread")
-else()
-  #
-  # Explicitly link intel support libraries dynamically:
-  #
-  enable_if_supported(DEAL_II_LINKER_FLAGS "-shared-intel")
-endif()
-
-
 #############################
 #                           #
 #    For Release target:    #
index 379f051279cd30882d40e3571edb7af76d4a2dd1..bf1d3ef422ba79bc1ae900f95053970424127e24 100644 (file)
@@ -103,12 +103,6 @@ if(CMAKE_CROSSCOMPILING)
     )
 endif()
 
-if(DEAL_II_STATIC_EXECUTABLE)
-  _both(
-    "#\n#        STATIC LINKAGE!\n"
-    )
-endif()
-
 _both("#\n")
 
 _detailed(
index c4120ba69161e9e411f6ce149f0cd8d4cf021d96..96f9181342cd5e242d227a30130aa0857bec8aee 100644 (file)
@@ -791,14 +791,6 @@ cmake -DLAPACK_FOUND=true \
           to true, static archives will be preferred over dynamic libraries when
           searching for features and corresponding link interface.
 
-        <li>
-          <code>DEAL_II_STATIC_EXECUTABLE</code> (defaults to off):
-          If set to true, <acronym>deal.II</acronym> will be configured in
-          a way to provide a link interface that is suitable for static
-          linkage of executables. Enabling this option forces
-          <code>BUILD_SHARED_LIBS=OFF</code> and
-          <code>DEAL_II_PREFER_STATIC_LIBS=ON</code>.
-
         <li>
           <code>CMAKE_INSTALL_RPATH_USE_LINK_PATH</code>: If set
           (default), the <acronym>deal.II</acronym> library will be
index b6f2fc4374833335fea9de972d715d51aef4b2c1..d847e43f3b414eb8b747344ca48d250d2b4cdbc0 100644 (file)
@@ -811,10 +811,6 @@ DEAL_II_MPIEXEC_NUMPROC_FLAG
 DEAL_II_MPIEXEC_PREFLAGS
 DEAL_II_MPIEXEC_POSTFLAGS
 
-
-DEAL_II_STATIC_EXECUTABLE        - true if the link interface is set up to
-                                   compile resulting executables statically
-
 #
 # Information about include directories and libraries
 #
index e01d24f8d5df4a287d7e947b731ceb28d97a12ca..42cf98fca608beec3c309c5623ad0229922b531d 100644 (file)
@@ -53,7 +53,6 @@
 # set(DEAL_II_EARLY_DEPRECATIONS OFF CACHE BOOL "")
 # set(BUILD_SHARED_LIBS "ON" CACHE BOOL "")
 # set(DEAL_II_PREFER_STATIC_LIBS "OFF" CACHE BOOL "")
-# set(DEAL_II_STATIC_EXECUTABLE "OFF" CACHE BOOL "")
 # set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE BOOL "")
 
 #

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


Typeset in Trocchi and Trocchi Bold Sans Serif.