]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Remove unnecessary includes
authorMatthias Maier <tamiko@43-1.org>
Fri, 10 Mar 2023 19:39:37 +0000 (13:39 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 17 Mar 2023 12:44:54 +0000 (07:44 -0500)
cmake/macros/macro_populate_target_properties.cmake
source/CMakeLists.txt

index 9cb79f18b64f7fdf57305fbee8ca1dfb9450f1bd..7c086fb1502807de339cd173f75757bb21d03f8e 100644 (file)
@@ -52,10 +52,8 @@ function(populate_target_properties _target _build)
   set_target_properties(${_target} PROPERTIES LINKER_LANGUAGE "CXX")
 
   #
-  # Include the current source directory of any target as private include
-  # and add the contents of ${DEAL_II_INCLUDE_DIRS} as a public interface.
+  # Add the contents of ${DEAL_II_INCLUDE_DIRS} as a public interface.
   #
-  target_include_directories(${_target} BEFORE PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
   target_include_directories(${_target} SYSTEM ${_visibility} ${DEAL_II_INCLUDE_DIRS})
 
   # Build-directory specific includes:
index 4f0ecbe6e8f8bf2710728bc4933303d309853bb1..25214e6817d6d5f01ffbf44115d95ec86991edd4 100644 (file)
@@ -35,6 +35,13 @@ endif()
 # Compile the deal.II library
 #
 
+#
+# Automatically add the current source and binary directory as include
+# directory. The binary directory is needed in order to find the expaned
+# .inst include files.
+#
+set(CMAKE_INCLUDE_CURRENT_DIR true)
+
 #
 # List the directories where we have source files. the ones with the longest
 # compile jobs come first so that 'make -j N' saturates many processors also
@@ -43,7 +50,6 @@ endif()
 # end of everything (e.g. numerics/vectors.cc takes several minutes to
 # compile...)
 #
-set(CMAKE_INCLUDE_CURRENT_DIR true)
 add_subdirectory(numerics)
 add_subdirectory(fe)
 add_subdirectory(dofs)

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.