From: maier Date: Fri, 5 Apr 2013 06:45:39 +0000 (+0000) Subject: CMake: Bugfix. Don't rename header destination in an in-source build X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f221bba9bfba1a1f073145d44a5740201faff3a;p=dealii-svn.git CMake: Bugfix. Don't rename header destination in an in-source build git-svn-id: https://svn.dealii.org/trunk@29195 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/setup_deal_ii.cmake b/deal.II/cmake/setup_deal_ii.cmake index d3a5e01b7a..a7f8efe4f6 100644 --- a/deal.II/cmake/setup_deal_ii.cmake +++ b/deal.II/cmake/setup_deal_ii.cmake @@ -105,11 +105,12 @@ 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") - IF("${CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_BINARY_DIR}") + IF( "${CMAKE_INSTALL_PREFIX}" STREQUAL "${CMAKE_BINARY_DIR}" AND + (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}") ) # - # Ensure that always BINARY_DIR/include != INSTALL_PREFIX/include. - # Otherwise stale headers might get included resulting in a failing - # build. + # Ensure that in case of an out of source build BINARY_DIR/include != + # INSTALL_PREFIX/include us always true. Otherwise stale headers might + # get included resulting in a failing build. # SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include/install") ELSE()