]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Rename DEAL_II_NAMESPACE to DEAL_II_TARGET_NAME 14993/head
authorMatthias Maier <tamiko@43-1.org>
Thu, 30 Mar 2023 04:16:49 +0000 (23:16 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 30 Mar 2023 04:24:08 +0000 (23:24 -0500)
cmake/config/CMakeLists.txt
cmake/macros/macro_define_interface_target.cmake
cmake/macros/macro_insource_setup_target.cmake
cmake/macros/macro_populate_target_properties.cmake
cmake/setup_deal_ii.cmake
cmake/setup_write_config.cmake
contrib/python-bindings/source/CMakeLists.txt
doc/developers/cmake-internals.html
source/CMakeLists.txt
tests/CMakeLists.txt

index 7fb02f104f2921157d501610ee292de0d1689824..5642088e9113a6c7796f4f134f04c1eb5c0dac20 100644 (file)
@@ -81,7 +81,7 @@ foreach(_build ${DEAL_II_BUILD_TYPES})
     endif()
   endif()
 
-  set(CONFIG_TARGET_${_build} ${DEAL_II_NAMESPACE}::${DEAL_II_NAMESPACE}_${_build_lowercase})
+  set(CONFIG_TARGET_${_build} ${DEAL_II_TARGET_NAME}::${DEAL_II_TARGET_NAME}_${_build_lowercase})
   list(APPEND CONFIG_TARGET ${_keyword} \${DEAL_II_TARGET_${_build}})
 endforeach()
 
index 6cd70cf8d84652667ffbab6f5f0eb3c8dd671440..d4b908f667bd639d91463d3842b76f20dbfa0a28 100644 (file)
@@ -130,7 +130,7 @@ function(define_interface_target _feature)
     endif()
 
     export(TARGETS ${_interface_target}
-      NAMESPACE "${DEAL_II_NAMESPACE}::"
+      NAMESPACE "${DEAL_II_TARGET_NAME}::"
       FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
       APPEND
       )
index f6449755161b024ed8f1204dda9d1beacbb824cf..d11b1271d995186da2551aa815cb02b1183451da 100644 (file)
@@ -55,5 +55,5 @@ function(insource_setup_target _target _build)
       ${DEAL_II_INCLUDE_DIRS}
     )
 
-  target_link_libraries(${_target} ${DEAL_II_NAMESPACE}_${_build_lowercase})
+  target_link_libraries(${_target} ${DEAL_II_TARGET_NAME}_${_build_lowercase})
 endfunction()
index 255398e8d06a93d9041d3897d79f40c5509f17ec..ca64dbf711710a038c7854756401e9be16fc038f 100644 (file)
 
 function(populate_target_properties _target _build)
 
-  if(NOT "${_target}" MATCHES "^(object|bundled|${DEAL_II_NAMESPACE})_")
+  if(NOT "${_target}" MATCHES "^(object|bundled|${DEAL_II_TARGET_NAME})_")
     message(FATAL_ERROR
       "Internal error: The specified target name must begin with object_, "
-      "bundled_, or ${DEAL_II_NAMESPACE}_. Encountered: ${_target}"
+      "bundled_, or ${DEAL_II_TARGET_NAME}_. Encountered: ${_target}"
       )
   endif()
 
   set(_visibility PRIVATE)
-  if("${_target}" MATCHES "^${DEAL_II_NAMESPACE}")
+  if("${_target}" MATCHES "^${DEAL_II_TARGET_NAME}")
     set(_visibility PUBLIC)
   endif()
 
index 2bec84d023625c0f62b36f5ff7126f6dbdb75ce8..fed80ebf096d9b4aa33ddc479ac000c79fb377b8 100644 (file)
@@ -37,7 +37,7 @@
 #
 # Information about paths, install locations and names:
 
-#     DEAL_II_NAMESPACE               *)
+#     DEAL_II_TARGET_NAME             *)
 #
 #     DEAL_II_PROJECT_CONFIG_NAME     *)
 #     DEAL_II_BASE_NAME               *)
@@ -70,7 +70,7 @@
 set_if_empty(DEAL_II_PACKAGE_NAME "deal.II")
 
 set_if_empty(DEAL_II_PACKAGE_VENDOR
-  "The deal.II Authors <http://www.dealii.org/>"
+  "The deal.II Authors <https://www.dealii.org/>"
   )
 set_if_empty(DEAL_II_PACKAGE_DESCRIPTION
   "Library for solving partial differential equations with the finite element method"
@@ -102,9 +102,9 @@ set(DEAL_II_VERSION ${DEAL_II_VERSION_MAJOR}.${DEAL_II_VERSION_MINOR}.${DEAL_II_
 #                                                                      #
 ########################################################################
 
-string(REPLACE "." "" _namespace "${DEAL_II_PACKAGE_NAME}")
-string(TOLOWER "${_namespace}" _namespace)
-set_if_empty(DEAL_II_NAMESPACE "${_namespace}")
+string(REPLACE "." "" _name "${DEAL_II_PACKAGE_NAME}")
+string(TOLOWER "${_name}" _name)
+set_if_empty(DEAL_II_TARGET_NAME "${_name}")
 
 set_if_empty(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
 
index 07458af8ec08d81e2f3dda28a629f746b1b88c08..26c5629ce3481c7a584c9de8ac24e3db31ebf56e 100644 (file)
@@ -133,7 +133,7 @@ _detailed("#  Library targets:\n")
 foreach(_build ${DEAL_II_BUILD_TYPES})
   string(TOLOWER "${_build}" _build_lowercase)
   _detailed("#\n")
-  _print_target(${DEAL_II_NAMESPACE}_${_build_lowercase})
+  _print_target(${DEAL_II_TARGET_NAME}_${_build_lowercase})
 endforeach()
 _detailed("#\n")
 
index ca1fd416df78d7da5900912c2b33071c41e6e7d5..a1b435a2e33c59f0ddf8c092c5bc32674bb0d713 100644 (file)
@@ -71,7 +71,7 @@ foreach(_build ${DEAL_II_BUILD_TYPES})
   endif()
 
   target_link_libraries(PyDealII_${_build_lowercase}
-    ${DEAL_II_NAMESPACE}_${_build_lowercase}
+    ${DEAL_II_TARGET_NAME}_${_build_lowercase}
     ${Boost_LIBRARIES}
     ${PYTHON_LIBRARIES}
     )
index aca8b48c0f0553fcce47d671fcd4eb19b0202999..6dc08dc36d9c9c0fdd5697724a2b2a1cf5456528 100644 (file)
@@ -96,7 +96,7 @@ list(APPEND CONFIG_LIBRARIES
   ${CONFIG_LIBRARIES_${_build}}
   )
 
-set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
+set_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase}
   PROPERTIES
   VERSION ${VERSION}
   SOVERSION ${VERSION}
index ca59fe2abef92f59d6434628fda2feba1e21a62a..dae2579b0e574dd2f85baf33972816a8e9aadef3 100644 (file)
@@ -90,26 +90,26 @@ foreach(build ${DEAL_II_BUILD_TYPES})
     endforeach()
   endif()
 
-  add_library(${DEAL_II_NAMESPACE}_${build_lowercase} dummy.cc ${_object_files})
-  add_dependencies(library ${DEAL_II_NAMESPACE}_${build_lowercase})
+  add_library(${DEAL_II_TARGET_NAME}_${build_lowercase} dummy.cc ${_object_files})
+  add_dependencies(library ${DEAL_II_TARGET_NAME}_${build_lowercase})
 
   #
   # Add compile flags, definitions and (public) feature (recorded in
   # DEAL_II_TARGETS(|_DEBUG|_RELEASE)).
   #
-  populate_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase} ${build})
+  populate_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase} ${build})
 
   if(BUILD_SHARED_LIBS)
     #
     # Add all object targets as private link targets
     #
     get_property(_object_targets GLOBAL PROPERTY DEAL_II_OBJECT_TARGETS_${build})
-    target_link_libraries(${DEAL_II_NAMESPACE}_${build_lowercase}
+    target_link_libraries(${DEAL_II_TARGET_NAME}_${build_lowercase}
       PRIVATE ${_object_targets}
       )
     endif()
 
-  set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
+  set_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase}
     PROPERTIES
     LINKER_LANGUAGE "CXX"
     VERSION "${DEAL_II_PACKAGE_VERSION}"
@@ -128,7 +128,7 @@ foreach(build ${DEAL_II_BUILD_TYPES})
     )
 
   if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
+    set_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase}
       PROPERTIES
       MACOSX_RPATH OFF
       BUILD_WITH_INSTALL_RPATH OFF
@@ -145,7 +145,7 @@ foreach(build ${DEAL_II_BUILD_TYPES})
   # lib locations for _DEBUG (no support for dynamic linking, _RELEASE will be
   # ignored), but we do it anyhow.
   if (DEAL_II_MSVC)
-    set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
+    set_target_properties(${DEAL_II_TARGET_NAME}_${build_lowercase}
       PROPERTIES
       ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
       LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
@@ -157,13 +157,13 @@ foreach(build ${DEAL_II_BUILD_TYPES})
   endif()
 
   file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR})
-  export(TARGETS ${DEAL_II_NAMESPACE}_${build_lowercase}
-    NAMESPACE "${DEAL_II_NAMESPACE}::"
+  export(TARGETS ${DEAL_II_TARGET_NAME}_${build_lowercase}
+    NAMESPACE "${DEAL_II_TARGET_NAME}::"
     FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
     APPEND
     )
 
-  install(TARGETS ${DEAL_II_NAMESPACE}_${build_lowercase}
+  install(TARGETS ${DEAL_II_TARGET_NAME}_${build_lowercase}
     COMPONENT library
     EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
     RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
@@ -173,7 +173,7 @@ foreach(build ${DEAL_II_BUILD_TYPES})
 endforeach()
 
 install(EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
-  NAMESPACE "${DEAL_II_NAMESPACE}::"
+  NAMESPACE "${DEAL_II_TARGET_NAME}::"
   DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
   COMPONENT library
   )
index 335b65da94dcc184408eed4d16f2cda579c32cee..83ed940e6af543068eb2d4e8eeb2216c31a3611a 100644 (file)
@@ -169,7 +169,7 @@ if(DEFINED DEAL_II_HAVE_TESTS_DIRECTORY)
   add_dependencies(test setup_tests_quick_tests)
   foreach(_build ${DEAL_II_BUILD_TYPES})
     string(TOLOWER ${_build} _build_lowercase)
-    add_dependencies(test ${DEAL_II_NAMESPACE}_${_build_lowercase})
+    add_dependencies(test ${DEAL_II_TARGET_NAME}_${_build_lowercase})
   endforeach()
 
   #

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.