diff options
author | Naios <naios-dev@live.de> | 2016-04-14 20:30:31 +0200 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-04-14 21:30:43 +0200 |
commit | 2038c311001982dba100d33a6fbb8797f9de1c87 (patch) | |
tree | 82e0f3a1901197138aeab63621c0c4c1abf0cb22 /cmake/macros/ConfigureScripts.cmake | |
parent | 48776d9ce9ecb846cc049f70ceb18176226af1bf (diff) |
Core/Scripting: Disallow the build directory to contain spaces
* I wasn't able to work arround a path which contains spaces,
since it seems like a CMake specific issue.
* Closes #16947
(cherry picked from commit 42eeb28a8b9c1f3ae2d667e4238e956a4a95bd6c)
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() |