diff options
Diffstat (limited to 'cmake/macros/ConfigureScripts.cmake')
-rw-r--r-- | cmake/macros/ConfigureScripts.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/macros/ConfigureScripts.cmake b/cmake/macros/ConfigureScripts.cmake index a6a39bd9306..5260d3a1afe 100644 --- a/cmake/macros/ConfigureScripts.cmake +++ b/cmake/macros/ConfigureScripts.cmake @@ -9,6 +9,21 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # Returns the base path to the script directory in the source directory +function(WarnAboutSpacesInBuildPath) + # Only check win32 since unix doesn't allow spaces in paths + if (WIN32) + string(FIND "${CMAKE_BINARY_DIR}" " " SPACE_INDEX_POS) + + if (SPACE_INDEX_POS GREATER -1) + message("") + message(WARNING " *** WARNING!\n" + " *** Your selected build directory contains spaces!\n" + " *** Please note that this will cause issues!") + endif() + endif() +endfunction() + +# Returns the base path to the script directory in the source directory function(GetScriptsBasePath variable) set(${variable} "${CMAKE_SOURCE_DIR}/src/server/scripts" PARENT_SCOPE) endfunction() |