diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-08-19 09:49:56 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-08-19 09:49:56 (GMT) |
commit | 637207e62af7e6104dd8328c182d18870f1b155b (patch) | |
tree | 15541e84238cf8bd02fcdf8b71856d5bda404186 /Modules | |
parent | d46f8afae98cd8f50cff9915a5a9dc680b9e0518 (diff) | |
download | CMake-637207e62af7e6104dd8328c182d18870f1b155b.zip CMake-637207e62af7e6104dd8328c182d18870f1b155b.tar.gz CMake-637207e62af7e6104dd8328c182d18870f1b155b.tar.bz2 |
do not escape spaces in regular expressions
The space has no special meaning in regular expressions so it doesn't need to
be escaped.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPackRPM.cmake | 2 | ||||
-rw-r--r-- | Modules/FindArmadillo.cmake | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 066b295..b5826ef 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -259,7 +259,7 @@ if(RPMBUILD_EXECUTABLE) OUTPUT_VARIABLE _TMP_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - string(REGEX REPLACE "^.*\ " "" + string(REGEX REPLACE "^.* " "" RPMBUILD_EXECUTABLE_VERSION ${_TMP_VERSION}) if(CPACK_RPM_PACKAGE_DEBUG) diff --git a/Modules/FindArmadillo.cmake b/Modules/FindArmadillo.cmake index aad22d2..ebbdb0a 100644 --- a/Modules/FindArmadillo.cmake +++ b/Modules/FindArmadillo.cmake @@ -64,7 +64,7 @@ if(ARMADILLO_INCLUDE_DIR) string(REGEX REPLACE ".*#define ARMA_VERSION_PATCH ([0-9]+).*" "\\1" ARMADILLO_VERSION_PATCH "${_armadillo_HEADER_CONTENTS}") # WARNING: The number of spaces before the version name is not one. - string(REGEX REPLACE ".*#define ARMA_VERSION_NAME\ +\"([0-9a-zA-Z\ _-]+)\".*" "\\1" ARMADILLO_VERSION_NAME "${_armadillo_HEADER_CONTENTS}") + string(REGEX REPLACE ".*#define ARMA_VERSION_NAME +\"([0-9a-zA-Z _-]+)\".*" "\\1" ARMADILLO_VERSION_NAME "${_armadillo_HEADER_CONTENTS}") endif() |