From 005c018b3de8fa5130a7204000d5ec6aea14abe3 Mon Sep 17 00:00:00 2001 From: Chuck Atkins <chuck.atkins@kitware.com> Date: Fri, 9 Dec 2016 09:11:33 -0500 Subject: [PATCH] Block in-source-builds --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec47dd506..9c3809584 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,14 @@ #------------------------------------------------------------------------------# cmake_minimum_required(VERSION 3.7) + +# Fail immediately if not using an out-of-source build +if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) + message(FATAL_ERROR + "In-source builds are not supported. Please create a build directory " + "separate from the source directory") +endif() + project(ADIOS VERSION 2.0.0) #------------------------------------------------------------------------------# -- GitLab