]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
yacs swig compatibility
authoradam <adam>
Mon, 21 Sep 2009 12:44:12 +0000 (12:44 +0000)
committeradam <adam>
Mon, 21 Sep 2009 12:44:12 +0000 (12:44 +0000)
salome_adm/cmake_files/am2cmake.py

index 4cc506a0a6124b8ca63c1fac46c92e3caab55db3..875baadd2ac83ad6f38fef2031af591d6ffad681 100644 (file)
@@ -997,6 +997,24 @@ class CMakeFile(object):
             ''')
             pass
         
+        # --
+        # --
+        if self.__thedict__.has_key("BUILT_SOURCES"):
+            newlines.append('''
+            FOREACH(f ${BUILT_SOURCES})
+            IF(f MATCHES "WRAP.cxx$")
+            # STRING(REGEX REPLACE "WRAP.cxx" "WRAP.h" inc ${f})
+            STRING(REGEX REPLACE "WRAP.cxx" ".i" input ${f})
+            ADD_CUSTOM_COMMAND(
+            OUTPUT ${f} # ${inc}
+            COMMAND ${SWIG_EXECUTABLE} ${SWIG_FLAGS} ${SWIG_PYTHON_INCLUDES} ${MYSWIG_FLAGS} -o ${f} ${CMAKE_CURRENT_SOURCE_DIR}/${input}
+            MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/${input}
+            )
+            ENDIF(f MATCHES "WRAP.cxx$")
+            ENDFOREACH(f ${BUILT_SOURCES})
+            ''')
+            pass
+
         # --
         # --
         key = "MOC_FILES"