diff options
author | Sean Cross <sean@xobs.io> | 2019-08-14 21:30:39 +0800 |
---|---|---|
committer | Sean Cross <sean@xobs.io> | 2019-08-14 21:30:39 +0800 |
commit | 6e932f5a2db83bece51f744ed59c42a0f7377b6f (patch) | |
tree | f5059d25caa8c2ad66e4db427f1d80597b096814 | |
parent | 3f26cf50767143e48d29ae691b2a0052c359eb15 (diff) | |
download | nextpnr-6e932f5a2db83bece51f744ed59c42a0f7377b6f.tar.gz nextpnr-6e932f5a2db83bece51f744ed59c42a0f7377b6f.tar.bz2 nextpnr-6e932f5a2db83bece51f744ed59c42a0f7377b6f.zip |
cmakelists: quote the last argument to REGEX REPLACE
With newer versions of cmake, an unquoted 6th argument gives the
following error:
STRING sub-command REGEX, mode REPLACE needs at least 6 arguments
total to command.
Quoting this fixes the issue.
Signed-off-by: Sean Cross <sean@xobs.io>
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ec078e2..c58104de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,18 +136,18 @@ if (BUILD_PYTHON) # Original source: https://github.com/BVLC/caffe/blob/master/cmake/Dependencies.cmake#L148 set(version ${PYTHONLIBS_VERSION_STRING}) - STRING(REGEX REPLACE "[^0-9]" "" boost_py_version ${version}) + STRING(REGEX REPLACE "[^0-9]" "" boost_py_version "${version}") find_package(Boost QUIET COMPONENTS "python-py${boost_py_version}" ${boost_libs}) set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND}) while (NOT "${version}" STREQUAL "" AND NOT Boost_PYTHON_FOUND) - STRING(REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version ${version}) + STRING(REGEX REPLACE "([0-9.]+).[0-9]+" "\\1" version "${version}") - STRING(REGEX REPLACE "[^0-9]" "" boost_py_version ${version}) + STRING(REGEX REPLACE "[^0-9]" "" boost_py_version "${version}") find_package(Boost QUIET COMPONENTS "python-py${boost_py_version}" ${boost_libs}) set(Boost_PYTHON_FOUND ${Boost_PYTHON-PY${boost_py_version}_FOUND}) - STRING(REGEX MATCHALL "([0-9.]+).[0-9]+" has_more_version ${version}) + STRING(REGEX MATCHALL "([0-9.]+).[0-9]+" has_more_version "${version}") if ("${has_more_version}" STREQUAL "") break() endif () @@ -175,7 +175,7 @@ if (BUILD_PYTHON) endif () if (NOT Boost_PYTHON_FOUND) - STRING(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" gentoo_version ${PYTHONLIBS_VERSION_STRING}) + STRING(REGEX REPLACE "([0-9]+\\.[0-9]+).*" "\\1" gentoo_version "${PYTHONLIBS_VERSION_STRING}") find_package(Boost QUIET COMPONENTS python-${gentoo_version} ${boost_libs}) if ("${Boost_LIBRARIES}" MATCHES ".*(python|PYTHON).*" ) set(Boost_PYTHON_FOUND TRUE) |