From: Matthias Maier Date: Fri, 10 Mar 2023 19:39:37 +0000 (-0600) Subject: CMake: Remove unnecessary includes X-Git-Tag: v9.5.0-rc1~446^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f09f1375ffb0a27c19cb64ce8c32927f33393fb;p=dealii.git CMake: Remove unnecessary includes --- diff --git a/cmake/macros/macro_populate_target_properties.cmake b/cmake/macros/macro_populate_target_properties.cmake index 9cb79f18b6..7c086fb150 100644 --- a/cmake/macros/macro_populate_target_properties.cmake +++ b/cmake/macros/macro_populate_target_properties.cmake @@ -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: diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 4f0ecbe6e8..25214e6817 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -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)