]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: clean up deal.IIConfig.cmake
authorMatthias Maier <tamiko@43-1.org>
Wed, 30 Nov 2022 20:13:19 +0000 (14:13 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 17 Mar 2023 12:44:53 +0000 (07:44 -0500)
cmake/config/CMakeLists.txt
cmake/config/Config.cmake.in

index 512e57b8070745636bcb7ed68d5b17db66fe97e2..aaa53f90e17aa75c7e4dec462f25fb4f0c1a4c05 100644 (file)
@@ -64,21 +64,6 @@ install(FILES ${_macros}
 #                                                                      #
 ########################################################################
 
-#
-# Strip -Wno-deprecated-declarations from DEAL_II_CXX_FLAGS so that
-# deprecation warnings are actually shown for user code:
-#
-
-strip_flag(DEAL_II_CXX_FLAGS "-Wno-deprecated-declarations")
-
-#
-# Strip -Wsuggest-override. Enabling this warning is a stylistic choice
-# that might create a substantial amount of warnings in user codebases.
-# Let's be nice and disable the flag for now.
-#
-
-strip_flag(DEAL_II_CXX_FLAGS "-Wsuggest-override")
-
 #
 # Populate a bunch of CONFIG_* variables with useful information:
 #
@@ -86,9 +71,8 @@ strip_flag(DEAL_II_CXX_FLAGS "-Wsuggest-override")
 foreach(_build ${DEAL_II_BUILD_TYPES})
   string(TOLOWER ${_build} _build_lowercase)
 
-  if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
-    set(_keyword "general")
-  else()
+  set(_keyword)
+  if("${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
     if(_build MATCHES DEBUG)
       set(_keyword "debug")
     else()
@@ -96,24 +80,6 @@ foreach(_build ${DEAL_II_BUILD_TYPES})
     endif()
   endif()
 
-  #
-  # Build up library name depending on link type and platform:
-  #
-
-  if(BUILD_SHARED_LIBS)
-    set(_type "SHARED")
-  else()
-    set(_type "STATIC")
-  endif()
-
-  set(_name "${CMAKE_${_type}_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}${CMAKE_${_type}_LIBRARY_SUFFIX}")
-  set(CONFIG_LIBRARIES_${_build}
-    "\${DEAL_II_PATH}/${DEAL_II_LIBRARY_RELDIR}/${_name}"
-    ${DEAL_II_LIBRARIES_${_build}}
-    ${DEAL_II_LIBRARIES}
-    )
-  list(APPEND CONFIG_LIBRARIES ${_keyword} \${DEAL_II_LIBRARIES_${_build}})
-
   set(CONFIG_TARGET_${_build} ${DEAL_II_NAMESPACE}::${DEAL_II_NAMESPACE}_${_build_lowercase})
   list(APPEND CONFIG_TARGET ${_keyword} \${DEAL_II_TARGET_${_build}})
 endforeach()
@@ -123,12 +89,6 @@ endforeach()
 #
 
 set(CONFIG_BUILD_DIR TRUE)
-set(CONFIG_INCLUDE_DIRS
-  \${DEAL_II_PATH}/include
-  ${CMAKE_SOURCE_DIR}/include/
-  ${DEAL_II_BUNDLED_INCLUDE_DIRS}
-  ${DEAL_II_INCLUDE_DIRS}
-  )
 
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
@@ -145,22 +105,7 @@ configure_file(
 # For installation:
 #
 
-# Make sure that we only ever record the bundled subdirectory if it is in
-# fact created:
-if("${DEAL_II_BUNDLED_INCLUDE_DIRS}" STREQUAL "")
-  set(_installed_bundled "")
-else()
-  set(_installed_bundled
-    "\${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled"
-    )
-endif()
-
 set(CONFIG_BUILD_DIR FALSE)
-set(CONFIG_INCLUDE_DIRS
-  \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}
-  ${_installed_bundled}
-  ${DEAL_II_INCLUDE_DIRS}
-  )
 
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
index 352ac3cbdb24d76de15d68bd9c28c9f3634b1fd3..c5d2b919a30707cb5b9b844d5e0f8b853f4c6f25 100644 (file)
@@ -131,18 +131,6 @@ set(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_LINKER_FLAGS_DEBUG@")
 # _additionally_ used for release targets:
 set(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_LINKER_FLAGS_RELEASE@")
 
-# used for all targets:
-set(DEAL_II_DEFINITIONS "@DEAL_II_DEFINITIONS@")
-set(DEAL_II_USER_DEFINITIONS "${DEAL_II_DEFINITIONS}")
-
-# _additionally_ used for debug targets:
-set(DEAL_II_DEFINITIONS_DEBUG "@DEAL_II_DEFINITIONS_DEBUG@")
-set(DEAL_II_USER_DEFINITIONS_DEBUG "${DEAL_II_DEFINITIONS_DEBUG}")
-
-# _additionally_ used for release targets:
-set(DEAL_II_DEFINITIONS_RELEASE "@DEAL_II_DEFINITIONS_RELEASE@")
-set(DEAL_II_USER_DEFINITIONS_RELEASE "${DEAL_II_DEFINITIONS_RELEASE}")
-
 #
 # MPI runtime:
 #
@@ -152,22 +140,6 @@ set(DEAL_II_MPIEXEC_NUMPROC_FLAG "@MPIEXEC_NUMPROC_FLAG@")
 set(DEAL_II_MPIEXEC_PREFLAGS "@MPIEXEC_PREFLAGS@")
 set(DEAL_II_MPIEXEC_POSTFLAGS "@MPIEXEC_POSTFLAGS@")
 
-#
-# Information about include directories and libraries
-#
-
-# Full list of include directories:
-set(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS@")
-
-# Full list of libraries for the debug target:
-set(DEAL_II_LIBRARIES_DEBUG "@CONFIG_LIBRARIES_DEBUG@")
-
-# Full list of libraries for the release target:
-set(DEAL_II_LIBRARIES_RELEASE "@CONFIG_LIBRARIES_RELEASE@")
-
-# Full list of libraries with "debug" and "optimized" keywords for easy use with TARGET_LINK_LIBRARIES:
-set(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@")
-
 
 #
 # Information about library targets and feature configuration

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.