Added a fatal error message when attempting an in-source build.

In-source builds are pain and suffering and I am going to stop people
from doing them to save them that pain.
This commit is contained in:
Ronald Kinard 2015-03-08 18:47:26 -05:00
parent c43b41e183
commit 2f52a5d34f
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,10 @@ project(SRB2
VERSION 2.1.14
LANGUAGES C)
if(${PROJECT_SOURCE_DIR} MATCHES ${PROJECT_BINARY_DIR})
message(FATAL_ERROR "In-source builds will bring you a world of pain. Please make a separate directory to invoke CMake from.")
endif()
# Set up CMAKE path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")