diff options
author | Roger Leigh <rleigh@debian.org> | 2013-09-30 19:52:21 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-09-30 19:52:21 +0100 |
commit | cf077ea3a11a82ecb640d7f9bab822a150f3231d (patch) | |
tree | d953fcb8067dadc561d2fb6e9f3e1dd1878154a3 | |
parent | 1d2748f9da0777f99024573a1212675a73ba8ab5 (diff) | |
download | schroot-cf077ea3a11a82ecb640d7f9bab822a150f3231d.tar.gz |
cmake: Don't allow building in the source directory
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d4a6ae0..e044b7ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,11 @@ cmake_minimum_required(VERSION 2.8) project(schroot) + +if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") + message(FATAL_ERROR "In-tree builds are not supported; please run cmake from a separate build directory.") +endif("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") + # Obtain version information from VERSION and/or git. set(GIT_VERSION_FILE "cmake/GitVersion.cmake" CACHE FILEPATH "Location of version metadata") |