]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove checks for CMake versions prior to 3.13.4 14785/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 10 Feb 2023 03:52:38 +0000 (22:52 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 10 Feb 2023 03:56:36 +0000 (22:56 -0500)
cmake/configure/configure_40_cuda.cmake
cmake/macros/macro_deal_ii_add_library.cmake
cmake/macros/macro_deal_ii_setup_target.cmake
cmake/macros/macro_insource_setup_target.cmake
contrib/python-bindings/CMakeLists.txt
tests/CMakeLists.txt

index 475ba7d6e778763e4222a3d43311e3bb73d768db..c576153d003aea9a57516dd2409e2b356ff8fb9b 100644 (file)
@@ -52,19 +52,6 @@ macro(feature_cuda_find_external var)
       #
       set(${var} TRUE)
 
-      #
-      # CUDA support requires CMake version 3.9 or newer
-      #
-      if(CMAKE_VERSION VERSION_LESS 3.9)
-        set(${var} FALSE)
-        message(STATUS "deal.II requires CMake version 3.9, or newer for CUDA support")
-        set(CUDA_ADDITIONAL_ERROR_STRING
-          ${CUDA_ADDITIONAL_ERROR_STRING}
-          "deal.II requires CMake version 3.9, or newer for CUDA support.\n"
-          "Reconfigure with a sufficient cmake version."
-          )
-      endif()
-
       #
       # disable CUDA support older than 10.2:
       #
index 939f6bb88aa1b15090bb44090036a0a1141626eb..87a9fd9fca506fa081700dbfaa007e67d3c75bae 100644 (file)
@@ -40,26 +40,13 @@ macro(deal_ii_add_library _library)
       LINKER_LANGUAGE "CXX"
       )
 
-    if(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+    set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
+    separate_arguments(_flags)
+    target_compile_options(${_library}_${_build_lowercase} PUBLIC ${_flags})
 
-      set_target_properties(${_library}_${_build_lowercase} PROPERTIES
-        COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
-        COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
-        )
-
-    else()
-
-      set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
-      separate_arguments(_flags)
-      target_compile_options(${_library}_${_build_lowercase} PUBLIC
-        $<$<COMPILE_LANGUAGE:CXX>:${_flags}>
-        )
-
-      target_compile_definitions(${_library}_${_build_lowercase}
-        PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
-        )
-
-    endif()
+    target_compile_definitions(${_library}_${_build_lowercase}
+      PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
+      )
 
     set_property(GLOBAL APPEND PROPERTY DEAL_II_OBJECTS_${_build}
       "$<TARGET_OBJECTS:${_library}_${_build_lowercase}>"
index 3b331f302628a164213fb1e3638b241f9fb197e1..75ec74acf57cf63e6427eed4a497669032e25878 100644 (file)
@@ -114,27 +114,14 @@ macro(deal_ii_setup_target _target)
     LINK_FLAGS " ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
     )
 
-  if(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    set_property(TARGET ${_target} APPEND_STRING PROPERTY
-      COMPILE_FLAGS " ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
-      )
-    set_property(TARGET ${_target} APPEND PROPERTY
-      COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
-      )
+  set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
+  separate_arguments(_flags)
 
-  else()
-
-    set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
-    separate_arguments(_flags)
-    target_compile_options(${_target} PUBLIC
-      $<$<COMPILE_LANGUAGE:CXX>:${_flags}>
-      )
+  target_compile_options(${_target} PUBLIC ${_flags})
 
-    target_compile_definitions(${_target}
-      PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
-      )
-
-  endif()
+  target_compile_definitions(${_target}
+    PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
+    )
 
   #
   # Set up the link interface:
index 5f61cf3caadb529ab5de1fb046c4d61be8f07199..556fecaf0d3ed8d5e19475a8655c038e1b2acd97 100644 (file)
@@ -40,26 +40,13 @@ function(insource_setup_target _target _build)
     )
   target_include_directories(${_target} SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS})
 
-  if(CMAKE_VERSION VERSION_LESS 3.9 OR CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
-    set_property(TARGET ${_target} APPEND_STRING PROPERTY
-      COMPILE_FLAGS " ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
-      )
-    set_property(TARGET ${_target} APPEND PROPERTY
-      COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
-      )
+  set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
+  separate_arguments(_flags)
+  target_compile_options(${_target} PUBLIC ${_flags})
 
-  else()
-
-    set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
-    separate_arguments(_flags)
-    target_compile_options(${_target} PUBLIC
-      $<$<COMPILE_LANGUAGE:CXX>:${_flags}>
-      )
-
-    target_compile_definitions(${_target}
-      PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
-      )
-  endif()
+  target_compile_definitions(${_target}
+    PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
+    )
 
   get_property(_type TARGET ${_target} PROPERTY TYPE)
   if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
index 77613e20d43580269fd159bf2ad6e25b752cc6a1..1582f18d05b5665f1f467b025549210edc0eba0e 100644 (file)
@@ -21,15 +21,10 @@ if(DEAL_II_COMPONENT_PYTHON_BINDINGS)
   #
   # Find Python:
   #
-  # Since CMake 3.12, FindPythonInterp is deprecated.
-  if (CMAKE_VERSION VERSION_LESS 3.12)
-    include(FindPythonInterp)
-  else()
-    find_package(Python3)
-    set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
-    set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
-    set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
-  endif()
+  find_package(Python3)
+  set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
+  set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
+  set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
   include(FindPythonLibs)
 
   if(DEAL_II_FEATURE_BOOST_BUNDLED_CONFIGURED)
index 560331cedf61f2b397c12cbf60aea550b8afd5ee..335b65da94dcc184408eed4d16f2cda579c32cee 100644 (file)
@@ -155,11 +155,6 @@ if(DEFINED DEAL_II_HAVE_TESTS_DIRECTORY)
   # Define a top-level "test" target that runs our quick tests wrapper.
   #
 
-  if("${CMAKE_VERSION}" VERSION_LESS "3.11" AND POLICY CMP0037)
-    # allow to override "test" target for quick tests
-    cmake_policy(SET CMP0037 OLD)
-  endif()
-
   # Use the first available build type (this prefers debug mode if available):
   list(GET DEAL_II_BUILD_TYPES 0 _my_build)
   add_custom_target(test

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.