Permalink
Browse files

Don't allow in-source builds, they are a source of confusion

  • Loading branch information...
1 parent c217944 commit 4794f3e70f98e2b42a453c32541118b050de78fe @tbonfort tbonfort committed Oct 15, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 CMakeLists.txt
View
@@ -2,6 +2,13 @@ cmake_minimum_required (VERSION 2.6)
project (MapServer)
+if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
+ message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:
+ mkdir build; cd build; cmake ..
+Before that, remove the files created by this failed run:
+ rm -rf CMakeCache.txt CMakeFiles")
+endif("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
+
include(CheckLibraryExists)
include(CheckFunctionExists)
include(CheckIncludeFile)

3 comments on commit 4794f3e

@szekerest
Member

What is the reason of this change, and why did it happen in the stable branch only?

@tbonfort
Member

because it is a source of confusion given that it produces/overrides the testing Makefile we have in the source directory. why not master: because it hasn't been merged yet

@tbonfort
Member

I've merged it into master just now

Please sign in to comment.