From 8278c1892e60f34d8c870aca83886520b8ba41f1 Mon Sep 17 00:00:00 2001 From: LordBlick Date: Sun, 20 Sep 2015 19:58:57 +0200 Subject: [PATCH] Disallow building in source tree to keep it clean --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09fa2cdcc7..e0a450b836 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,9 @@ cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR ) +if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} ) + message( FATAL_ERROR "In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there, points here. You may need to remove CMakeCache.txt." ) +endif() + project( kicad-i18n NONE ) find_package( Gettext REQUIRED )