From 0f221bba9bfba1a1f073145d44a5740201faff3a Mon Sep 17 00:00:00 2001 From: maier Date: Fri, 5 Apr 2013 06:45:39 +0000 Subject: [PATCH] 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 --- deal.II/cmake/setup_deal_ii.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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() -- 2.39.5