summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2015-11-18 10:59:48 +0300
committerDmitry Kozlov <xeb@mail.ru>2015-11-18 10:59:48 +0300
commit7bd189503adb5ca31d5a731a65355a86bd27a1ed (patch)
treea6cc4ae6e291b84bf9c6090ca86250cc9c525a66
parent74c00bfc521a6136d4ee0d776f8d1717014b2bfc (diff)
downloadaccel-ppp-7bd189503adb5ca31d5a731a65355a86bd27a1ed.tar.gz
accel-ppp-7bd189503adb5ca31d5a731a65355a86bd27a1ed.zip
cmake: check for build directory is separated directory from sources
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ea7f4f0..53cdc393 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0005 NEW)
cmake_policy(SET CMP0003 OLD)
+if (CMAKE_BINARY_DIR STREQUAL CMAKE_HOME_DIRECTORY)
+ message(FATAL_ERROR "Building in source directory is forbidden. Please make separated build directory.")
+endif ()
+
project(accel-ppp C)
include(cmake/cpack.cmake)