Skip to content

Commit

Permalink
Don't allow in-source builds, they are a source of confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Oct 15, 2013
1 parent c217944 commit 4794f3e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Expand Up @@ -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)
Expand Down

3 comments on commit 4794f3e

@szekerest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@tbonfort
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've merged it into master just now

Please sign in to comment.