From: adam Date: Thu, 8 Jan 2009 15:56:09 +0000 (+0000) Subject: Fixes after merge from 4.1.4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5d80076aae0a23a5baa2ef344afc468ddf22aab9;p=modules%2Fkernel.git Fixes after merge from 4.1.4 Compatibility cmake 2.6 --- diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index e0c7d31db..0be73b5fb 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -53,7 +53,7 @@ p_if = re.compile(r""" if # an if \s+ # 1 or more space (?P # open the group val -\w+ # the group contain 1 or more alphanumeric characters +[^\s]+ # the group contain 1 or more non space characters ) # close the group """, re.VERBOSE) @@ -227,6 +227,13 @@ class CMakeFile(object): def initialize(self, newlines): if self.root == self.the_root: + # -- + newlines.append(""" + CMAKE_MINIMUM_REQUIRED(VERSION 2.4) + IF(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) + ENDIF(COMMAND cmake_policy) + """) # -- if self.module == "kernel": newlines.append(""" @@ -381,6 +388,9 @@ class CMakeFile(object): match = p_if.match(line) if match: theif = match.group("val") + if theif[0] == "!": + theif = "NOT " + theif[1:] + pass line = p_if.sub(r"IF(%s)"%(theif), line) opened_ifs.append(theif) newlines.append(line)