From: maier Date: Tue, 2 Apr 2013 08:06:58 +0000 (+0000) Subject: Bugfix: Rename include directory in case CMAKE_INSTALL_PREFIX == CMAKE_BINARY_DIR X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df550bc75038f0c9ca35f881d97ed5adb3b37269;p=dealii-svn.git Bugfix: Rename include directory in case CMAKE_INSTALL_PREFIX == CMAKE_BINARY_DIR 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 --- diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake index 6a9c9a0f6a..549d4f6fae 100644 --- a/deal.II/cmake/setup_deal_ii.cmake +++ b/deal.II/cmake/setup_deal_ii.cmake @@ -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()