From 800dc279968479e31ac486d99388012e4c9b7b27 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 30 Nov 2022 14:13:19 -0600 Subject: [PATCH] CMake: clean up deal.IIConfig.cmake --- cmake/config/CMakeLists.txt | 59 ++---------------------------------- cmake/config/Config.cmake.in | 28 ----------------- 2 files changed, 2 insertions(+), 85 deletions(-) diff --git a/cmake/config/CMakeLists.txt b/cmake/config/CMakeLists.txt index 512e57b807..aaa53f90e1 100644 --- a/cmake/config/CMakeLists.txt +++ b/cmake/config/CMakeLists.txt @@ -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 diff --git a/cmake/config/Config.cmake.in b/cmake/config/Config.cmake.in index 352ac3cbdb..c5d2b919a3 100644 --- a/cmake/config/Config.cmake.in +++ b/cmake/config/Config.cmake.in @@ -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 -- 2.39.5