From 76267c4b5db7929fe893e70ff0aef714e90fb594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich@dune-project.org> Date: Mon, 24 Oct 2016 23:54:05 +0200 Subject: [PATCH] [cmake] Dune module names can contain numbers This was a regression of the CMake build-system Fixes #48 --- cmake/modules/DuneMacros.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake index 2266ebe5d..42051ca74 100644 --- a/cmake/modules/DuneMacros.cmake +++ b/cmake/modules/DuneMacros.cmake @@ -284,12 +284,12 @@ endmacro(extract_line) # into list of modules and list of versions # macro(split_module_version STRING MODULES VERSIONS) - set(REGEX "[a-zA-Z-]+[ ]*(\\([ ]*([^ ]+)?[ ]*[^ ]+[ ]*\\))?") + set(REGEX "[a-zA-Z0-9-]+[ ]*(\\([ ]*([^ ]+)?[ ]*[^ ]+[ ]*\\))?") string(REGEX MATCHALL "${REGEX}" matches "${STRING}") set(${MODULES} "") set(${VERSIONS} "") foreach(i ${matches}) - string(REGEX REPLACE "^([a-zA-Z-]+).*$" "\\1" mod ${i}) + string(REGEX REPLACE "^([a-zA-Z0-9-]+).*$" "\\1" mod ${i}) string(REGEX MATCH "\\([ ]*(([^ ]+)?[ ]*[^ ]+)[ ]*\\)" have_version ${i}) if(have_version) @@ -309,7 +309,7 @@ endmacro(split_module_version) # Convert a string with spaces in a list which is a string with semicolon # function(convert_deps_to_list var) - string(REGEX REPLACE "([a-zA-Z\\)]) ([a-zA-Z])" "\\1;\\2" ${var} ${${var}}) + string(REGEX REPLACE "([a-zA-Z0-9\\)]) ([a-zA-Z0-9])" "\\1;\\2" ${var} ${${var}}) set(${var} ${${var}} PARENT_SCOPE) endfunction(convert_deps_to_list var) -- GitLab