summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-29 20:31:46 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-08-29 20:31:46 (GMT)
commit483a147136c980676011d4628fd13a399907f8d4 (patch)
treefdf437bd6558c96b88f3faecef2b8385a114b42a /Modules/CPackRPM.cmake
parentc8276401c6eef8f3198763ecaccd2f039802d3fd (diff)
downloadCMake-483a147136c980676011d4628fd13a399907f8d4.zip
CMake-483a147136c980676011d4628fd13a399907f8d4.tar.gz
CMake-483a147136c980676011d4628fd13a399907f8d4.tar.bz2
ENH: fail with error if trying to create a RPM stating that rpmbuild can't
handle spaces Alex
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 9628fbf..ad333be 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -17,6 +17,10 @@ IF(NOT RPMBUILD_EXECUTABLE)
MESSAGE(FATAL_ERROR "RPM package requires rpmbuild executable")
ENDIF(NOT RPMBUILD_EXECUTABLE)
+IF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
+ MESSAGE(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
+ENDIF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*")
+
# If rpmbuild is found
# we try to discover alien since we may be on non RPM distro like Debian.
# In this case we may try to to use more advanced features