From: vsr Date: Mon, 15 Apr 2013 10:19:18 +0000 (+0000) Subject: Fix build with CMake - process nesting variables substitutions properly X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9f2d3791c05f56362d368a695d58bec3c9a789c6;p=modules%2Fyacs.git Fix build with CMake - process nesting variables substitutions properly --- diff --git a/salome_adm/cmake_files/deprecated/am2cmake.py b/salome_adm/cmake_files/deprecated/am2cmake.py index 6d4bd1bf4..18e69841a 100644 --- a/salome_adm/cmake_files/deprecated/am2cmake.py +++ b/salome_adm/cmake_files/deprecated/am2cmake.py @@ -33,7 +33,7 @@ p_multiline = re.compile(r""" p_dollar = re.compile(r""" \$\( # a $ then a ( (?P # open the group val -[^)]* # the group contain 0 or more non ) characters +[^()]* # the group contain 0 or more non ) characters ) # close the group \) # a ) at the end """, re.VERBOSE) @@ -980,7 +980,13 @@ class CMakeFile(object): # Replace the $(TOTO) by ${TOTO} # Replace the @TOTO@ by ${TOTO} # -- - line = p_dollar.sub(r"${\1}", line) + # VSR 15.04.2013 - process nesting substitutions properly, e.g. $(aaa$(bbb)) + #line = p_dollar.sub(r"${\1}", line) + m_dollar = p_dollar.search(line) + while m_dollar: + line = p_dollar.sub(r"${\1}", line) + m_dollar = p_dollar.search(line) + pass line = p_arobas.sub(r"${\1}", line) # --