From 630bea3769abb9ceb02fabe42ae01aab3fd09848 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 25 Nov 2022 06:31:02 -0600 Subject: [PATCH] CMake: Remove _USER variables Traditionally we have used two "independent" sets of variables to keep track of feature configurations: _INCLUDE_DIRS _DEFINITIONS(|_RELEASE|_DEBUG) and _USER_INCLUDE_DIRS _USER_DEFINITIONS(|_RELEASE|_DEBUG) The former was intended for internal use only and the latter for exporting whatever is necessary to user projects. However, this has not been used at all in the last 10 years. So let us remove this distinction and simply always export include dirs and definitions to users. This simplification is required to switch to our features to interface targets. --- cmake/config/CMakeLists.txt | 8 +++--- cmake/config/Config.cmake.in | 6 ++--- cmake/configure/configure_20_boost.cmake | 11 +++----- .../configure_50_complex_values.cmake | 6 ++--- .../configure_50_vectorization.cmake | 8 +++--- .../macro_deal_ii_insource_setup_target.cmake | 2 +- cmake/macros/macro_deal_ii_setup_target.cmake | 6 ++--- cmake/modules/FindADOLC.cmake | 3 --- cmake/modules/FindARBORX.cmake | 1 - cmake/modules/FindASSIMP.cmake | 1 - cmake/modules/FindBOOST.cmake | 1 - cmake/modules/FindCGAL.cmake | 12 +++------ cmake/modules/FindCUDA.cmake | 1 - cmake/modules/FindGINKGO.cmake | 1 - cmake/modules/FindGMSH.cmake | 16 +++-------- cmake/modules/FindGSL.cmake | 2 -- cmake/modules/FindHDF5.cmake | 2 -- cmake/modules/FindKOKKOS.cmake | 1 - cmake/modules/FindLAPACK.cmake | 1 - cmake/modules/FindMETIS.cmake | 2 -- cmake/modules/FindMPI.cmake | 2 -- cmake/modules/FindOPENCASCADE.cmake | 2 -- cmake/modules/FindP4EST.cmake | 2 -- cmake/modules/FindPETSC.cmake | 3 --- cmake/modules/FindSLEPC.cmake | 2 -- cmake/modules/FindSUNDIALS.cmake | 2 -- cmake/modules/FindSYMENGINE.cmake | 1 - cmake/modules/FindTASKFLOW.cmake | 1 - cmake/modules/FindTBB.cmake | 1 - cmake/modules/FindTRILINOS.cmake | 3 --- cmake/modules/FindUMFPACK.cmake | 3 --- cmake/setup_compiler_flags.cmake | 3 --- cmake/setup_compiler_flags_gnu.cmake | 2 -- cmake/setup_compiler_flags_intel.cmake | 2 -- cmake/setup_compiler_flags_msvc.cmake | 3 --- cmake/setup_deal_ii.cmake | 3 +-- cmake/setup_write_config.cmake | 9 ------- doc/developers/cmake-internals.html | 27 +++++-------------- doc/users/cmake_user.html | 26 +++++++++--------- 39 files changed, 51 insertions(+), 137 deletions(-) diff --git a/cmake/config/CMakeLists.txt b/cmake/config/CMakeLists.txt index 2eb87c03f8..db465e340b 100644 --- a/cmake/config/CMakeLists.txt +++ b/cmake/config/CMakeLists.txt @@ -126,7 +126,7 @@ set(CONFIG_INCLUDE_DIRS \${DEAL_II_PATH}/include ${CMAKE_SOURCE_DIR}/include/ ${DEAL_II_BUNDLED_INCLUDE_DIRS} - ${DEAL_II_USER_INCLUDE_DIRS} + ${DEAL_II_INCLUDE_DIRS} ) configure_file( @@ -158,7 +158,7 @@ set(CONFIG_BUILD_DIR FALSE) set(CONFIG_INCLUDE_DIRS \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR} ${_installed_bundled} - ${DEAL_II_USER_INCLUDE_DIRS} + ${DEAL_II_INCLUDE_DIRS} ) configure_file( @@ -344,7 +344,7 @@ to_string_and_add_prefix(CONFIG_INCLUDE_DIRS_PC "-I" \\\${prefix}/include ${CMAKE_SOURCE_DIR}/include ${DEAL_II_BUNDLED_INCLUDE_DIRS} - ${DEAL_II_USER_INCLUDE_DIRS} + ${DEAL_II_INCLUDE_DIRS} ) foreach(_build ${DEAL_II_BUILD_TYPES}) @@ -368,7 +368,7 @@ set(CONFIG_PATH_PC "${CMAKE_INSTALL_PREFIX}") to_string_and_add_prefix(CONFIG_INCLUDE_DIRS_PC "-I" \\\${includedir} ${DEAL_II_BUNDLED_INCLUDE_DIRS} - ${DEAL_II_USER_INCLUDE_DIRS} + ${DEAL_II_INCLUDE_DIRS} ) foreach(_build ${DEAL_II_BUILD_TYPES}) diff --git a/cmake/config/Config.cmake.in b/cmake/config/Config.cmake.in index 11a70b2cc2..0f1cbfd06d 100644 --- a/cmake/config/Config.cmake.in +++ b/cmake/config/Config.cmake.in @@ -132,13 +132,13 @@ set(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_LINKER_FLAGS_DEBUG@") set(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_LINKER_FLAGS_RELEASE@") # used for all targets: -set(DEAL_II_USER_DEFINITIONS "@DEAL_II_USER_DEFINITIONS@") +set(DEAL_II_DEFINITIONS "@DEAL_II_DEFINITIONS@") # _additionally_ used for debug targets: -set(DEAL_II_USER_DEFINITIONS_DEBUG "@DEAL_II_USER_DEFINITIONS_DEBUG@") +set(DEAL_II_DEFINITIONS_DEBUG "@DEAL_II_DEFINITIONS_DEBUG@") # _additionally_ used for release targets: -set(DEAL_II_USER_DEFINITIONS_RELEASE "@DEAL_II_USER_DEFINITIONS_RELEASE@") +set(DEAL_II_DEFINITIONS_RELEASE "@DEAL_II_DEFINITIONS_RELEASE@") # # MPI runtime: diff --git a/cmake/configure/configure_20_boost.cmake b/cmake/configure/configure_20_boost.cmake index 9559e1abb1..d4b9df4dff 100644 --- a/cmake/configure/configure_20_boost.cmake +++ b/cmake/configure/configure_20_boost.cmake @@ -68,14 +68,12 @@ macro(FEATURE_BOOST_CONFIGURE_COMMON) reset_cmake_required() - # Fix some problems by defining some additional preprocessor - # symbols. Ultimately these are added into DEAL_II_DEFINITIONS and - # DEAL_II_USER_DEFINITIONS. They are separate here so that they show up in - # detailed.log under DEAL_II_WITH_BOOST as, logically, they are part of our - # boost configuration. + # Fix some problems by defining some additional preprocessor symbols. + # Ultimately these are added into DEAL_II_DEFINITIONS. They are separate + # here so that they show up in detailed.log under DEAL_II_WITH_BOOST as, + # logically, they are part of our boost configuration. if(NOT DEAL_II_HAS_AUTO_PTR) list(APPEND BOOST_DEFINITIONS "BOOST_NO_AUTO_PTR") - list(APPEND BOOST_USER_DEFINITIONS "BOOST_NO_AUTO_PTR") endif() enable_if_supported(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs") @@ -141,7 +139,6 @@ macro(FEATURE_BOOST_CONFIGURE_BUNDLED) # BOOST_ALL_NO_LIB on Windows platforms (for bundled boost). # list(APPEND BOOST_DEFINITIONS "BOOST_ALL_NO_LIB") - list(APPEND BOOST_USER_DEFINITIONS "BOOST_ALL_NO_LIB") endif() endmacro() diff --git a/cmake/configure/configure_50_complex_values.cmake b/cmake/configure/configure_50_complex_values.cmake index f69eda13c5..b8a086c879 100644 --- a/cmake/configure/configure_50_complex_values.cmake +++ b/cmake/configure/configure_50_complex_values.cmake @@ -12,17 +12,17 @@ ## the top level directory of deal.II. ## ## --------------------------------------------------------------------- - + # # Configuration for complex value support # if(${DEAL_II_WITH_COMPLEX_VALUES}) - set(DEAL_II_EXPAND_COMPLEX_SCALARS + set(DEAL_II_EXPAND_COMPLEX_SCALARS "std::complex" "std::complex" ) - set(DEAL_II_EXPAND_COMPLEX_VECTORS + set(DEAL_II_EXPAND_COMPLEX_VECTORS "Vector >" "Vector >" ) diff --git a/cmake/configure/configure_50_vectorization.cmake b/cmake/configure/configure_50_vectorization.cmake index 6e2d0abe4c..510e8bd62c 100644 --- a/cmake/configure/configure_50_vectorization.cmake +++ b/cmake/configure/configure_50_vectorization.cmake @@ -12,7 +12,7 @@ ## the top level directory of deal.II. ## ## --------------------------------------------------------------------- - + # # Configuration for real scalar vectorization # @@ -22,19 +22,19 @@ set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED "VectorizedArray" "Vectoriz set(DEAL_II_EXPAND_FLOAT_VECTORIZED "VectorizedArray") if(${DEAL_II_VECTORIZATION_WIDTH_IN_BITS} GREATER 0) - set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED + set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED "${DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED}" "VectorizedArray" "VectorizedArray") set(DEAL_II_EXPAND_FLOAT_VECTORIZED "${DEAL_II_EXPAND_FLOAT_VECTORIZED}" "VectorizedArray") endif() if((${DEAL_II_VECTORIZATION_WIDTH_IN_BITS} GREATER 128)) - set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED + set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED "${DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED}" "VectorizedArray" "VectorizedArray") set(DEAL_II_EXPAND_FLOAT_VECTORIZED "${DEAL_II_EXPAND_FLOAT_VECTORIZED}" "VectorizedArray") endif() if((${DEAL_II_VECTORIZATION_WIDTH_IN_BITS} GREATER 256)) - set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED + set(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED "${DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED}" "VectorizedArray" "VectorizedArray") set(DEAL_II_EXPAND_FLOAT_VECTORIZED "${DEAL_II_EXPAND_FLOAT_VECTORIZED}" "VectorizedArray") endif() diff --git a/cmake/macros/macro_deal_ii_insource_setup_target.cmake b/cmake/macros/macro_deal_ii_insource_setup_target.cmake index a847b82f22..4009669a45 100644 --- a/cmake/macros/macro_deal_ii_insource_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_insource_setup_target.cmake @@ -45,7 +45,7 @@ macro(DEAL_II_INSOURCE_SETUP_TARGET _target _build) COMPILE_FLAGS " ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" ) set_property(TARGET ${_target} APPEND PROPERTY - COMPILE_DEFINITIONS "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_${_build}}" + COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" ) else() diff --git a/cmake/macros/macro_deal_ii_setup_target.cmake b/cmake/macros/macro_deal_ii_setup_target.cmake index a1efb2de3e..90a59ad6f6 100644 --- a/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_setup_target.cmake @@ -35,7 +35,7 @@ # "${DEAL_II_LINKER_FLAGS ${DEAL_II_LINKER_FLAGS_}" # # COMPILE_DEFINITIONS is appended with -# "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_}" +# "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_}" # # If no "DEBUG" or "RELEASE" keyword is specified after the target, the # current CMAKE_BUILD_TYPE is used instead. A CMAKE_BUILD_TYPE "Debug" is @@ -119,7 +119,7 @@ macro(DEAL_II_SETUP_TARGET _target) COMPILE_FLAGS " ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" ) set_property(TARGET ${_target} APPEND PROPERTY - COMPILE_DEFINITIONS "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_${_build}}" + COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}" ) else() @@ -131,7 +131,7 @@ macro(DEAL_II_SETUP_TARGET _target) ) target_compile_definitions(${_target} - PUBLIC ${DEAL_II_USER_DEFINITIONS} ${DEAL_II_USER_DEFINITIONS_${_build}} + PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}} ) endif() diff --git a/cmake/modules/FindADOLC.cmake b/cmake/modules/FindADOLC.cmake index 2ac0b2a147..a0b0e9bc1d 100644 --- a/cmake/modules/FindADOLC.cmake +++ b/cmake/modules/FindADOLC.cmake @@ -114,9 +114,6 @@ deal_ii_package_handle(ADOLC INCLUDE_DIRS REQUIRED ADOLC_INCLUDE_DIR ${_additional_include_dirs} - USER_INCLUDE_DIRS - REQUIRED ADOLC_INCLUDE_DIR - ${_additional_include_dirs} CLEAR ADOLC_INCLUDE_DIR ADOLC_LIBRARY ADOLC_SETTINGS_H ADOLC_DOUBLE_CAST_CHECK ADOLC_ADOUBLE_OSTREAM_CHECK # clean up checks in configure_adolc.cmake ) diff --git a/cmake/modules/FindARBORX.cmake b/cmake/modules/FindARBORX.cmake index bce8085066..989aa0a36f 100644 --- a/cmake/modules/FindARBORX.cmake +++ b/cmake/modules/FindARBORX.cmake @@ -67,6 +67,5 @@ endif() deal_ii_package_handle(ARBORX # ArborX is a header-only library INCLUDE_DIRS REQUIRED ARBORX_INSTALL_INCLUDE_DIR - USER_INCLUDE_DIRS REQUIRED ARBORX_INSTALL_INCLUDE_DIR CLEAR ARBORX_DIR ArborX_DIR ) diff --git a/cmake/modules/FindASSIMP.cmake b/cmake/modules/FindASSIMP.cmake index 51c6353dcf..ce9ed5944d 100644 --- a/cmake/modules/FindASSIMP.cmake +++ b/cmake/modules/FindASSIMP.cmake @@ -38,6 +38,5 @@ deal_ii_find_path(ASSIMP_INC assimp/defs.h deal_ii_package_handle(ASSIMP LIBRARIES REQUIRED ASSIMP_LIB INCLUDE_DIRS REQUIRED ASSIMP_INC - USER_INCLUDE_DIRS REQUIRED ASSIMP_INC CLEAR ASSIMP_LIB ASSIMP_INC ) diff --git a/cmake/modules/FindBOOST.cmake b/cmake/modules/FindBOOST.cmake index 4b5f760ce6..ebdfcd9a99 100644 --- a/cmake/modules/FindBOOST.cmake +++ b/cmake/modules/FindBOOST.cmake @@ -97,7 +97,6 @@ endif() deal_ii_package_handle(BOOST LIBRARIES REQUIRED Boost_LIBRARIES INCLUDE_DIRS REQUIRED Boost_INCLUDE_DIRS - USER_INCLUDE_DIRS Boost_INCLUDE_DIRS CLEAR Boost_DIR Boost_INCLUDE_DIRS Boost_IOSTREAMS_LIBRARY_DEBUG Boost_IOSTREAMS_LIBRARY_RELEASE Boost_LIBRARY_DIR diff --git a/cmake/modules/FindCGAL.cmake b/cmake/modules/FindCGAL.cmake index 1d5eda15a2..584d853189 100644 --- a/cmake/modules/FindCGAL.cmake +++ b/cmake/modules/FindCGAL.cmake @@ -87,13 +87,9 @@ else() endif() deal_ii_package_handle(CGAL - INCLUDE_DIRS - REQUIRED CGAL_INCLUDE_DIRS - LIBRARIES - OPTIONAL CGAL_LIBRARIES - USER_INCLUDE_DIRS - REQUIRED CGAL_INCLUDE_DIRS + LIBRARIES OPTIONAL CGAL_LIBRARIES + INCLUDE_DIRS REQUIRED CGAL_INCLUDE_DIRS CLEAR - CGAL_INCLUDE_DIRS - CGAL_LIBRARIES + CGAL_INCLUDE_DIRS + CGAL_LIBRARIES ) diff --git a/cmake/modules/FindCUDA.cmake b/cmake/modules/FindCUDA.cmake index b794dec9af..20efb60b71 100644 --- a/cmake/modules/FindCUDA.cmake +++ b/cmake/modules/FindCUDA.cmake @@ -46,7 +46,6 @@ endif() deal_ii_package_handle(CUDA LIBRARIES REQUIRED CUDA_LIBRARIES CUDA_cusparse_LIBRARY CUDA_cusolver_LIBRARY INCLUDE_DIRS REQUIRED CUDA_INCLUDE_DIRS - USER_INCLUDE_DIRS REQUIRED CUDA_INCLUDE_DIRS CLEAR CUDA_cublas_device_LIBRARY CUDA_cublas_LIBRARY diff --git a/cmake/modules/FindGINKGO.cmake b/cmake/modules/FindGINKGO.cmake index 008003dd0c..ccc7bdb229 100644 --- a/cmake/modules/FindGINKGO.cmake +++ b/cmake/modules/FindGINKGO.cmake @@ -78,6 +78,5 @@ endif() deal_ii_package_handle(GINKGO LIBRARIES REQUIRED ${_libraries} INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR - USER_INCLUDE_DIRS REQUIRED GINKGO_INSTALL_INCLUDE_DIR CLEAR Ginkgo_DIR ${_libraries} ) diff --git a/cmake/modules/FindGMSH.cmake b/cmake/modules/FindGMSH.cmake index 60601d84cc..9947d8cbbc 100644 --- a/cmake/modules/FindGMSH.cmake +++ b/cmake/modules/FindGMSH.cmake @@ -54,17 +54,9 @@ else() endif() deal_ii_package_handle(GMSH - EXECUTABLE - REQUIRED GMSH_EXE - LIBRARIES - OPTIONAL GMSH_LIBRARY - INCLUDE_DIRS - OPTIONAL GMSH_INCLUDE_DIR - USER_INCLUDE_DIRS - OPTIONAL GMSH_INCLUDE_DIR + EXECUTABLE REQUIRED GMSH_EXE + LIBRARIES OPTIONAL GMSH_LIBRARY + INCLUDE_DIRS OPTIONAL GMSH_INCLUDE_DIR CLEAR - GMSH_EXE - GMSH_LIBRARY - GMSH_INCLUDE_DIR - GMSH_WITH_API + GMSH_EXE GMSH_LIBRARY GMSH_INCLUDE_DIR GMSH_WITH_API ) diff --git a/cmake/modules/FindGSL.cmake b/cmake/modules/FindGSL.cmake index 726de2d9ce..1d4aa7b93c 100644 --- a/cmake/modules/FindGSL.cmake +++ b/cmake/modules/FindGSL.cmake @@ -76,7 +76,5 @@ deal_ii_package_handle(GSL OPTIONAL GSL_CBLAS_LIBRARY INCLUDE_DIRS REQUIRED GSL_INCLUDE_DIR - USER_INCLUDE_DIRS - REQUIRED GSL_INCLUDE_DIR CLEAR GSL_LIBRARY GSL_CBLAS_LIBRARY GSL_INCLUDE_DIR ) diff --git a/cmake/modules/FindHDF5.cmake b/cmake/modules/FindHDF5.cmake index d013167b7a..a40aed8530 100644 --- a/cmake/modules/FindHDF5.cmake +++ b/cmake/modules/FindHDF5.cmake @@ -47,8 +47,6 @@ deal_ii_package_handle(HDF5 OPTIONAL MPI_C_LIBRARIES INCLUDE_DIRS REQUIRED _include_dirs - USER_INCLUDE_DIRS - REQUIRED _include_dirs CLEAR HDF5_C_COMPILER_EXECUTABLE HDF5_C_LIBRARY_dl HDF5_C_LIBRARY_hdf5 HDF5_C_LIBRARY_m HDF5_C_LIBRARY_mpi HDF5_C_LIBRARY_sz HDF5_C_LIBRARY_z diff --git a/cmake/modules/FindKOKKOS.cmake b/cmake/modules/FindKOKKOS.cmake index 5e0f10fcf3..6ef4b0115a 100644 --- a/cmake/modules/FindKOKKOS.cmake +++ b/cmake/modules/FindKOKKOS.cmake @@ -82,7 +82,6 @@ else() deal_ii_package_handle(KOKKOS LIBRARIES REQUIRED KOKKOS_CORE_LIBRARY KOKKOS_CONTAINERS_LIBRARY INCLUDE_DIRS REQUIRED KOKKOS_INSTALL_INCLUDE_DIR - USER_INCLUDE_DIRS REQUIRED KOKKOS_INSTALL_INCLUDE_DIR CXX_FLAGS OPTIONAL KOKKOS_COMPILE_FLAGS LINKER_FLAGS OPTIONAL KOKKOS_EXTRA_LD_FLAGS CLEAR KOKKOS_DIR KOKKOS_CORE_LIBRARY KOKKOS_CONTAINERS_LIBRARY diff --git a/cmake/modules/FindLAPACK.cmake b/cmake/modules/FindLAPACK.cmake index ee3ddb2288..6b39f3cb33 100644 --- a/cmake/modules/FindLAPACK.cmake +++ b/cmake/modules/FindLAPACK.cmake @@ -107,7 +107,6 @@ deal_ii_package_handle(LAPACK OPTIONAL BLAS_LIBRARIES ${_additional_libraries} LINKER_FLAGS OPTIONAL LAPACK_LINKER_FLAGS BLAS_LINKER_FLAGS INCLUDE_DIRS OPTIONAL LAPACK_INCLUDE_DIRS - USER_INCLUDE_DIRS OPTIONAL LAPACK_INCLUDE_DIRS CLEAR atlas_LIBRARY atlcblas_LIBRARY atllapack_LIBRARY blas_LIBRARY eigen_blas_LIBRARY f77blas_LIBRARY gslcblas_LIBRARY lapack_LIBRARY diff --git a/cmake/modules/FindMETIS.cmake b/cmake/modules/FindMETIS.cmake index 96d0a748f4..b31d8d5ee4 100644 --- a/cmake/modules/FindMETIS.cmake +++ b/cmake/modules/FindMETIS.cmake @@ -87,7 +87,5 @@ deal_ii_package_handle(METIS OPTIONAL MPI_C_LIBRARIES INCLUDE_DIRS REQUIRED METIS_INCLUDE_DIR - USER_INCLUDE_DIRS - REQUIRED METIS_INCLUDE_DIR CLEAR METIS_LIBRARY METIS_INCLUDE_DIR ) diff --git a/cmake/modules/FindMPI.cmake b/cmake/modules/FindMPI.cmake index 5124acbe3f..bf31acf82b 100644 --- a/cmake/modules/FindMPI.cmake +++ b/cmake/modules/FindMPI.cmake @@ -170,8 +170,6 @@ deal_ii_package_handle(MPI OPTIONAL MPI_CXX_LIBRARIES MPI_Fortran_LIBRARIES MPI_C_LIBRARIES _mpi_libopen_pal_library INCLUDE_DIRS OPTIONAL MPI_CXX_INCLUDE_PATH MPI_C_INCLUDE_PATH - USER_INCLUDE_DIRS - OPTIONAL MPI_CXX_INCLUDE_PATH MPI_C_INCLUDE_PATH CXX_FLAGS OPTIONAL MPI_CXX_COMPILE_FLAGS LINKER_FLAGS OPTIONAL MPI_CXX_LINK_FLAGS CLEAR diff --git a/cmake/modules/FindOPENCASCADE.cmake b/cmake/modules/FindOPENCASCADE.cmake index d1861554e9..6754aa44cc 100644 --- a/cmake/modules/FindOPENCASCADE.cmake +++ b/cmake/modules/FindOPENCASCADE.cmake @@ -89,8 +89,6 @@ deal_ii_package_handle(OPENCASCADE REQUIRED ${_libraries} INCLUDE_DIRS REQUIRED OPENCASCADE_INCLUDE_DIR - USER_INCLUDE_DIRS - REQUIRED OPENCASCADE_INCLUDE_DIR CLEAR _opencascade_libraries ${_libraries} ) diff --git a/cmake/modules/FindP4EST.cmake b/cmake/modules/FindP4EST.cmake index 94f0221558..dec566ae11 100644 --- a/cmake/modules/FindP4EST.cmake +++ b/cmake/modules/FindP4EST.cmake @@ -204,8 +204,6 @@ deal_ii_package_handle(P4EST OPTIONAL LAPACK_LIBRARIES MPI_C_LIBRARIES INCLUDE_DIRS REQUIRED P4EST_INCLUDE_DIR SC_INCLUDE_DIR - USER_INCLUDE_DIRS - REQUIRED P4EST_INCLUDE_DIR SC_INCLUDE_DIR CLEAR SC_INCLUDE_DIR P4EST_LIBRARY_OPTIMIZED SC_LIBRARY_OPTIMIZED P4EST_LIBRARY_DEBUG SC_LIBRARY_DEBUG P4EST_INCLUDE_DIR diff --git a/cmake/modules/FindPETSC.cmake b/cmake/modules/FindPETSC.cmake index 5383b3cd33..5510095c29 100644 --- a/cmake/modules/FindPETSC.cmake +++ b/cmake/modules/FindPETSC.cmake @@ -214,9 +214,6 @@ deal_ii_package_handle(PETSC INCLUDE_DIRS REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH OPTIONAL PETSC_INCLUDE_DIR_MPIUNI _petsc_includes - USER_INCLUDE_DIRS - REQUIRED PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH - OPTIONAL PETSC_INCLUDE_DIR_MPIUNI _petsc_includes CLEAR PETSC_LIBRARY PETSC_INCLUDE_DIR_COMMON PETSC_INCLUDE_DIR_ARCH PETSC_PETSCVARIABLES ${_cleanup_variables} diff --git a/cmake/modules/FindSLEPC.cmake b/cmake/modules/FindSLEPC.cmake index ca60d8c17b..186051fa09 100644 --- a/cmake/modules/FindSLEPC.cmake +++ b/cmake/modules/FindSLEPC.cmake @@ -94,7 +94,5 @@ deal_ii_package_handle(SLEPC REQUIRED SLEPC_LIBRARY PETSC_LIBRARIES INCLUDE_DIRS REQUIRED SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON - USER_INCLUDE_DIRS - REQUIRED SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON CLEAR SLEPC_LIBRARY SLEPC_INCLUDE_DIR_ARCH SLEPC_INCLUDE_DIR_COMMON ) diff --git a/cmake/modules/FindSUNDIALS.cmake b/cmake/modules/FindSUNDIALS.cmake index a9c4aa8e8b..301f02f251 100644 --- a/cmake/modules/FindSUNDIALS.cmake +++ b/cmake/modules/FindSUNDIALS.cmake @@ -131,8 +131,6 @@ deal_ii_package_handle(SUNDIALS ${_sundials_lib_par} INCLUDE_DIRS REQUIRED SUNDIALS_INCLUDE_DIR - USER_INCLUDE_DIRS REQUIRED - SUNDIALS_INCLUDE_DIR CLEAR SUNDIALS_LIB_IDA SUNDIALS_LIB_IDAS diff --git a/cmake/modules/FindSYMENGINE.cmake b/cmake/modules/FindSYMENGINE.cmake index a9ea291bd6..0c7fdb611e 100644 --- a/cmake/modules/FindSYMENGINE.cmake +++ b/cmake/modules/FindSYMENGINE.cmake @@ -135,6 +135,5 @@ set(SYMENGINE_LIBRARIES ${_symengine_libraries}) deal_ii_package_handle(SYMENGINE LIBRARIES REQUIRED SYMENGINE_LIBRARIES INCLUDE_DIRS REQUIRED SYMENGINE_INCLUDE_DIRS - USER_INCLUDE_DIRS REQUIRED SYMENGINE_INCLUDE_DIRS CLEAR SYMENGINE_SETTINGS_H SYMENGINE_SKIP_DEPENDENCIES SymEngine_DIR ) diff --git a/cmake/modules/FindTASKFLOW.cmake b/cmake/modules/FindTASKFLOW.cmake index b668607645..07b1921806 100644 --- a/cmake/modules/FindTASKFLOW.cmake +++ b/cmake/modules/FindTASKFLOW.cmake @@ -53,6 +53,5 @@ string(REGEX REPLACE deal_ii_package_handle(TASKFLOW INCLUDE_DIRS REQUIRED TASKFLOW_INCLUDE_DIR - USER_INCLUDE_DIRS REQUIRED TASKFLOW_INCLUDE_DIR CLEAR TASKFLOW_CONFIG_DIR ) diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake index 5cd14eaa87..13928f6eeb 100644 --- a/cmake/modules/FindTBB.cmake +++ b/cmake/modules/FindTBB.cmake @@ -117,6 +117,5 @@ endif() deal_ii_package_handle(TBB LIBRARIES REQUIRED ${_libraries} INCLUDE_DIRS REQUIRED TBB_INCLUDE_DIR - USER_INCLUDE_DIRS REQUIRED TBB_INCLUDE_DIR CLEAR TBB_DEBUG_LIBRARY TBB_LIBRARY TBB_INCLUDE_DIR ) diff --git a/cmake/modules/FindTRILINOS.cmake b/cmake/modules/FindTRILINOS.cmake index cdfb4e960f..ac3f6d0ec4 100644 --- a/cmake/modules/FindTRILINOS.cmake +++ b/cmake/modules/FindTRILINOS.cmake @@ -162,9 +162,6 @@ deal_ii_package_handle(TRILINOS INCLUDE_DIRS REQUIRED Trilinos_INCLUDE_DIRS OPTIONAL Trilinos_TPL_INCLUDE_DIRS - USER_INCLUDE_DIRS - REQUIRED Trilinos_INCLUDE_DIRS - OPTIONAL Trilinos_TPL_INCLUDE_DIRS CXX_FLAGS OPTIONAL KOKKOS_COMPILE_FLAGS LINKER_FLAGS diff --git a/cmake/modules/FindUMFPACK.cmake b/cmake/modules/FindUMFPACK.cmake index 0bf6af99db..8b090b3657 100644 --- a/cmake/modules/FindUMFPACK.cmake +++ b/cmake/modules/FindUMFPACK.cmake @@ -135,9 +135,6 @@ deal_ii_package_handle(UMFPACK INCLUDE_DIRS REQUIRED UMFPACK_INCLUDE_DIR AMD_INCLUDE_DIR OPTIONAL SuiteSparse_config_INCLUDE_DIR - USER_INCLUDE_DIRS - REQUIRED UMFPACK_INCLUDE_DIR AMD_INCLUDE_DIR - OPTIONAL SuiteSparse_config_INCLUDE_DIR LINKER_FLAGS OPTIONAL LAPACK_LINKER_FLAGS CLEAR diff --git a/cmake/setup_compiler_flags.cmake b/cmake/setup_compiler_flags.cmake index e63341247f..cea8408760 100644 --- a/cmake/setup_compiler_flags.cmake +++ b/cmake/setup_compiler_flags.cmake @@ -35,9 +35,6 @@ # DEAL_II_DEFINITIONS # DEAL_II_DEFINITIONS_DEBUG # DEAL_II_DEFINITIONS_RELEASE -# DEAL_II_USER_DEFINITIONS -# DEAL_II_USER_DEFINITIONS_DEBUG -# DEAL_II_USER_DEFINITIONS_RELEASE # # All modifications shall be guarded with the ENABLE_IF_SUPPORTED # or ENABLE_IF_LINKS macro, e.g. diff --git a/cmake/setup_compiler_flags_gnu.cmake b/cmake/setup_compiler_flags_gnu.cmake index 2d069ac1e4..72b6a2d6c1 100644 --- a/cmake/setup_compiler_flags_gnu.cmake +++ b/cmake/setup_compiler_flags_gnu.cmake @@ -198,7 +198,6 @@ if (CMAKE_BUILD_TYPE MATCHES "Release") # Disable assert() in deal.II and user projects in release mode # list(APPEND DEAL_II_DEFINITIONS_RELEASE "NDEBUG") - list(APPEND DEAL_II_USER_DEFINITIONS_RELEASE "NDEBUG") # # There are many places in the library where we create a new typedef and then @@ -218,7 +217,6 @@ endif() if (CMAKE_BUILD_TYPE MATCHES "Debug") list(APPEND DEAL_II_DEFINITIONS_DEBUG "DEBUG") - list(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "DEBUG") # # In recent versions, gcc often eliminates too much debug information diff --git a/cmake/setup_compiler_flags_intel.cmake b/cmake/setup_compiler_flags_intel.cmake index 146b87d99c..9b761091b5 100644 --- a/cmake/setup_compiler_flags_intel.cmake +++ b/cmake/setup_compiler_flags_intel.cmake @@ -181,7 +181,6 @@ if (CMAKE_BUILD_TYPE MATCHES "Release") # Disable assert() in deal.II and user projects in release mode # list(APPEND DEAL_II_DEFINITIONS_RELEASE "NDEBUG") - list(APPEND DEAL_II_USER_DEFINITIONS_RELEASE "NDEBUG") # equivalent to -fno-strict-aliasing: enable_if_supported(DEAL_II_CXX_FLAGS_RELEASE "-no-ansi-alias") @@ -200,7 +199,6 @@ endif() if (CMAKE_BUILD_TYPE MATCHES "Debug") list(APPEND DEAL_II_DEFINITIONS_DEBUG "DEBUG") - list(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "DEBUG") add_flags(DEAL_II_CXX_FLAGS_DEBUG "-O0") diff --git a/cmake/setup_compiler_flags_msvc.cmake b/cmake/setup_compiler_flags_msvc.cmake index 5aaf651421..e129122cbc 100644 --- a/cmake/setup_compiler_flags_msvc.cmake +++ b/cmake/setup_compiler_flags_msvc.cmake @@ -46,7 +46,6 @@ enable_if_supported(DEAL_II_CXX_FLAGS "/EHsc") # Globally disable some legacy min and max macros that cause problems: enable_if_supported(DEAL_II_CXX_FLAGS "/NOMINMAX") list(APPEND DEAL_II_DEFINITIONS "NOMINMAX") -list(APPEND DEAL_II_USER_DEFINITIONS "NOMINMAX") # fix "fatal error C1128: number of sections exceeded object file format limit" # happening in debug mode with visual studio 2015 @@ -104,7 +103,6 @@ if (CMAKE_BUILD_TYPE MATCHES "Release") # Disable assert() in deal.II and user projects in release mode # list(APPEND DEAL_II_DEFINITIONS_RELEASE "NDEBUG") - list(APPEND DEAL_II_USER_DEFINITIONS_RELEASE "NDEBUG") endif() @@ -117,7 +115,6 @@ endif() if (CMAKE_BUILD_TYPE MATCHES "Debug") list(APPEND DEAL_II_DEFINITIONS_DEBUG "DEBUG") - list(APPEND DEAL_II_USER_DEFINITIONS_DEBUG "DEBUG") # generate some debug info: enable_if_supported(DEAL_II_CXX_FLAGS_DEBUG "/Zi /MDd /Od") diff --git a/cmake/setup_deal_ii.cmake b/cmake/setup_deal_ii.cmake index 90cf4cecaa..670efd87f7 100644 --- a/cmake/setup_deal_ii.cmake +++ b/cmake/setup_deal_ii.cmake @@ -133,8 +133,7 @@ endif() set(DEAL_II_LIST_SUFFIXES DEFINITIONS DEFINITIONS_RELEASE DEFINITIONS_DEBUG - USER_DEFINITIONS USER_DEFINITIONS_RELEASE USER_DEFINITIONS_DEBUG - INCLUDE_DIRS USER_INCLUDE_DIRS BUNDLED_INCLUDE_DIRS + INCLUDE_DIRS BUNDLED_INCLUDE_DIRS LIBRARIES LIBRARIES_RELEASE LIBRARIES_DEBUG ) diff --git a/cmake/setup_write_config.cmake b/cmake/setup_write_config.cmake index c57a50cb91..a975b82cf4 100644 --- a/cmake/setup_write_config.cmake +++ b/cmake/setup_write_config.cmake @@ -145,16 +145,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug") _detailed("# DEAL_II_DEFINITIONS_DEBUG: ${BASE_DEFINITIONS_DEBUG}\n") endif() -_detailed("# DEAL_II_USER_DEFINITIONS: ${BASE_DEFINITIONS}\n") -if(CMAKE_BUILD_TYPE MATCHES "Release") - _detailed("# DEAL_II_USER_DEFINITIONS_REL: ${BASE_DEFINITIONS_RELEASE}\n") -endif() -if(CMAKE_BUILD_TYPE MATCHES "Debug") - _detailed("# DEAL_II_USER_DEFINITIONS_DEB: ${BASE_DEFINITIONS_DEBUG}\n") -endif() - _detailed("# DEAL_II_INCLUDE_DIRS ${BASE_INCLUDE_DIRS}\n") -_detailed("# DEAL_II_USER_INCLUDE_DIRS: ${BASE_USER_INCLUDE_DIRS}\n") _detailed("# DEAL_II_BUNDLED_INCLUDE_DIRS: ${BASE_BUNDLED_INCLUDE_DIRS}\n") _detailed("# DEAL_II_LIBRARIES: ${BASE_LIBRARIES}\n") diff --git a/doc/developers/cmake-internals.html b/doc/developers/cmake-internals.html index be102262ee..07825d90b6 100644 --- a/doc/developers/cmake-internals.html +++ b/doc/developers/cmake-internals.html @@ -346,7 +346,7 @@ RESET_CMAKE_REQUIRED() FEATURE_FOUND FEATURE_LIBRARIES (with optimized, debug, release keywords) FEATURE_LIBRARIES(_DEBUG|_RELEASE) -FEATURE_INCLUDE_DIRS FEATURE_USER_INCLUDE_DIRS +FEATURE_INCLUDE_DIRS FEATURE_LINKER_FLAGS(|_DEBUG|_RELEASE) FEATURE_CXX_FLAGS(|_DEBUG|_RELEASE) FEATURE_DEFINITIONS(|_DEBUG|_RELEASE) @@ -422,7 +422,7 @@ SET_IF_EMPTY(FEATURE_DIR "$ENV{FEATURE_DIR}")
 FEATURE_LIBRARIES
 FEATURE_LIBRARIES(|_DEBUG|_RELEASE)
-FEATURE_(|USER_|BUNDLED_)INCLUDE_DIRS
+FEATURE_(|BUNDLED_)INCLUDE_DIRS
 FEATURE_LINKER_FLAGS(|_DEBUG|_RELEASE)
 FEATURE_CXX_FLAGS(|_DEBUG|_RELEASE)
 FEATURE_DEFINITIONS(|_DEBUG|_RELEASE)
@@ -548,17 +548,12 @@ DEAL_II_FORCE_BUNDLED_<FEATURE>        (an option)
       
 
     
  • - For internal use, for setting necessary include dirs for the compilation of the + Used to keep track of external include dirs, necessary for the + compilation of the library and user programs: deal.II library:
    • DEAL_II_INCLUDE_DIRS
    -
  • - Used to keep track of external include dirs, necessary for the - compilation of user programs: -
      -
    • DEAL_II_USER_INCLUDE_DIRS -
  • Include dirs from bundled packages necessary for the compilation of the library and user projects out of the build directory: @@ -567,22 +562,14 @@ DEAL_II_FORCE_BUNDLED_<FEATURE> (an option)
  • - For internal use, for setting necessary preprocessor definitions - (-D<...>) for the compilation of the - deal.II library: + For setting necessary preprocessor definitions + (-D<...>) for the compilation of the deal.II + library:
    • DEAL_II_DEFINITIONS
    • DEAL_II_DEFINITIONS_DEBUG
    • DEAL_II_DEFINITIONS_RELEASE
    -
  • - For external use, used to keep track of external preprocessor - definitions, necessary for the compilation of user programs: -
      -
    • DEAL_II_USER_DEFINITIONS -
    • DEAL_II_USER_DEFINITIONS_DEBUG -
    • DEAL_II_USER_DEFINITIONS_RELEASE -
  • For internal and external use, for setting necessary compiler flags, diff --git a/doc/users/cmake_user.html b/doc/users/cmake_user.html index f526394afd..c1fcaebe2e 100644 --- a/doc/users/cmake_user.html +++ b/doc/users/cmake_user.html @@ -489,9 +489,9 @@ DEAL_II_CXX_FLAGS_RELEASE DEAL_II_LINKER_FLAGS DEAL_II_LINKER_FLAGS_DEBUG DEAL_II_LINKER_FLAGS_RELEASE -DEAL_II_USER_DEFINITIONS -DEAL_II_USER_DEFINITIONS_DEBUG -DEAL_II_USER_DEFINITIONS_RELEASE +DEAL_II_DEFINITIONS +DEAL_II_DEFINITIONS_DEBUG +DEAL_II_DEFINITIONS_RELEASE
  • @@ -790,19 +790,19 @@ DEAL_II_BUILD_DIR - true if deal.II was picked up from a build # Compiler and linker configuration # -DEAL_II_CXX_COMPILER - the compiler used to compile deal.II +DEAL_II_CXX_COMPILER - the compiler used to compile deal.II -DEAL_II_CXX_FLAGS - compile flags for all configurations -DEAL_II_CXX_FLAGS_DEBUG - _additional_ compile flags for the debug configuration -DEAL_II_CXX_FLAGS_RELEASE - _additional_ compile flags for the release configuration +DEAL_II_CXX_FLAGS - compile flags for all configurations +DEAL_II_CXX_FLAGS_DEBUG - _additional_ compile flags for the debug configuration +DEAL_II_CXX_FLAGS_RELEASE - _additional_ compile flags for the release configuration -DEAL_II_LINKER_FLAGS - link flags for all configurations -DEAL_II_LINKER_FLAGS_DEBUG - _additional_ link flags for debug configuration -DEAL_II_LINKER_FLAGS_RELEASE - _additional_ link flags for release configuration +DEAL_II_LINKER_FLAGS - link flags for all configurations +DEAL_II_LINKER_FLAGS_DEBUG - _additional_ link flags for debug configuration +DEAL_II_LINKER_FLAGS_RELEASE - _additional_ link flags for release configuration -DEAL_II_USER_DEFINITIONS - compile definitions for all configurations -DEAL_II_USER_DEFINITIONS_DEBUG - _additional_ compile definitions for debug configuration -DEAL_II_USER_DEFINITIONS_RELEASE - _additional_ compile definitions for release configuration +DEAL_II_DEFINITIONS - compile definitions for all configurations +DEAL_II_DEFINITIONS_DEBUG - _additional_ compile definitions for debug configuration +DEAL_II_DEFINITIONS_RELEASE - _additional_ compile definitions for release configuration # # Information about MPI runtime for the mpi implementation used in the -- 2.39.5