From b4ff4a4a746e66e973b3e748e879cfeecef56e04 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Wed, 25 Sep 2024 08:49:42 +0200 Subject: [PATCH] ci: Prevent in-tree builds You will have to provide a build directory outside the amiberry sources, to keep things clean --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8c2f8b5..4851fd07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,7 @@ cmake_minimum_required(VERSION 3.16) +if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) + message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the amiberry source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there") +endif () project(amiberry-lite VERSION 5.7.5) enable_language(C CXX ASM)