Bsongis/travis datacopy (#7098)
datacopy.cpp now generated during build
This commit is contained in:
@@ -222,9 +222,13 @@ set(STM32LIB_SRC
|
||||
)
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
add_custom_target(datacopy
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp
|
||||
WORKING_DIRECTORY ${RADIO_DIRECTORY}/src
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/generate_datacopy.py datastructs.h -DPCBHORUS -DPCBX10 -DCPUARM -DCOLORLCD -DBACKUP -Itargets/horus > storage/datacopy.cpp
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${RADIO_DIRECTORY}/util/generate_datacopy.py datastructs.h -DPCBHORUS -DPCBX10 -DCPUARM -DCOLORLCD -DBACKUP -Itargets/horus > ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp
|
||||
DEPENDS ${RADIO_DIRECTORY}/src/datastructs.h ${RADIO_DIRECTORY}/util/generate_datacopy.py
|
||||
)
|
||||
)
|
||||
add_custom_target(datacopy
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/radio/src/datacopy.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -14,10 +14,12 @@ if sys.platform == "darwin":
|
||||
clang.cindex.Config.set_library_file('/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib')
|
||||
elif os.path.exists('/Library/Developer/CommandLineTools/usr/lib/libclang.dylib'):
|
||||
clang.cindex.Config.set_library_file('/Library/Developer/CommandLineTools/usr/lib/libclang.dylib')
|
||||
|
||||
if sys.platform == "linux2":
|
||||
if os.path.exists('/usr/lib/x86_64-linux-gnu/libclang-3.8.so.1'):
|
||||
clang.cindex.Config.set_library_file('/usr/lib/x86_64-linux-gnu/libclang-3.8.so.1')
|
||||
elif sys.platform.startswith("linux"):
|
||||
for version in ("6.0", "3.8"):
|
||||
libclang = "/usr/lib/x86_64-linux-gnu/libclang-%s.so.1" % version
|
||||
if os.path.exists(libclang):
|
||||
clang.cindex.Config.set_library_file(libclang)
|
||||
break
|
||||
|
||||
structs = []
|
||||
extrastructs = []
|
||||
@@ -31,7 +33,7 @@ def build_struct(cursor, anonymousUnion=False):
|
||||
for c in cursor.get_children():
|
||||
if c.kind == clang.cindex.CursorKind.UNION_DECL:
|
||||
if c.spelling:
|
||||
raise "Cannot handle non anonymous unions"
|
||||
raise Exception("Cannot handle non anonymous unions")
|
||||
|
||||
copied_union_member = False
|
||||
for uc in c.get_children():
|
||||
|
||||
Reference in New Issue
Block a user