]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix: Rename include directory in case CMAKE_INSTALL_PREFIX == CMAKE_BINARY_DIR
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Apr 2013 08:06:58 +0000 (08:06 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 2 Apr 2013 08:06:58 +0000 (08:06 +0000)
This fixes a regression where stale headers from the install location get
included instead of the corresponding headres from CMAKE_SOURCE_DIR
possibly resulting in a failing build

git-svn-id: https://svn.dealii.org/trunk@29144 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_deal_ii.cmake

index 6a9c9a0f6a1abc7588526398518c79fc71479711..549d4f6faeeb9a50c597a2625c90f3a5f0ee2d87 100644 (file)
@@ -98,7 +98,16 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   SET_IF_EMPTY(DEAL_II_DOCHTML_RELDIR "doc")
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "examples")
   SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin")
-  SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
+  IF("${CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_BINARY_DIR}")
+    #
+    # Ensure that always BINARY_DIR/include != INSTALL_PREFIX/include.
+    # Otherwise stale headers might get included resulting in a failing
+    # build.
+    #
+    SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include/inst")
+  ELSE()
+    SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
+  ENDIF()
   SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib")
   SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
 ELSE()

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.