]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Bugfix. Don't rename header destination in an in-source build
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Apr 2013 06:45:39 +0000 (06:45 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Apr 2013 06:45:39 +0000 (06:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@29195 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_deal_ii.cmake

index d3a5e01b7a39afc1f0eec65ab58e54824e7cdca9..a7f8efe4f62456018f857f6756763639cc70eb90 100644 (file)
@@ -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()

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.