datacopy.cpp generated file now part of the sources and can be generated manually with target datacopy

This commit is contained in:
Damjan Adamic
2016-03-16 20:15:54 +01:00
parent e0ead516f6
commit 5337092e93
3 changed files with 318 additions and 5 deletions
+7
View File
@@ -4,6 +4,8 @@ from __future__ import print_function
import sys
import clang.cindex
import time
import os
structs = []
@@ -32,6 +34,11 @@ def build(cursor):
build_struct(c)
return result
def header():
print("//This file was auto-generated by %s script on %s. Do not edit this file!\n\n\n" % (os.path.basename(sys.argv[0]), time.asctime()))
index = clang.cindex.Index.create()
translation_unit = index.parse(sys.argv[1], ['-x', 'c++', '-std=c++11'] + sys.argv[2:])
header()
build(translation_unit.cursor)