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
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