aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/macros/ConfigureScripts.cmake15
-rw-r--r--cmake/showoptions.cmake2
2 files changed, 17 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()
diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake
index 0739e74ac6a..9229590381a 100644
--- a/cmake/showoptions.cmake
+++ b/cmake/showoptions.cmake
@@ -122,6 +122,8 @@ if (BUILD_SHARED_LIBS)
message(" *** Dynamic linking was enforced through a dynamic script module!")
endif()
add_definitions(-DTRINITY_API_USE_DYNAMIC_LINKING)
+
+ WarnAboutSpacesInBuildPath()
endif()
message("")