From d9d262d3f17abb57946f623a30209cb8fd463fda Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 16 May 2024 06:05:57 -0700 Subject: [PATCH] prevent building in a folder which contains spaces (#1583) --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa517182..5f8dbaf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,11 @@ cmake_minimum_required(VERSION 3.25) project(Darkflame) + +# check if the path to the source directory contains a space +if("${CMAKE_SOURCE_DIR}" MATCHES " ") + message(FATAL_ERROR "The server cannot build in the path (" ${CMAKE_SOURCE_DIR} ") because it contains a space. Please move the server to a path without spaces.") +endif() + include(CTest) set(CMAKE_CXX_STANDARD 20)