summaryrefslogtreecommitdiff
path: root/include/ouroboros/wrap/CMakeLists.txt
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-11 12:06:53 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-11 12:06:53 +0100
commit747cde06887cc6893f650f52abcf1c9a08627d52 (patch)
tree3dae38ab12b80bc439f770a7892c613d56fb4f1d /include/ouroboros/wrap/CMakeLists.txt
parent77c32c24b781eafd518e2cbe9de46b348a26a201 (diff)
downloadouroboros-747cde06887cc6893f650f52abcf1c9a08627d52.tar.gz
ouroboros-747cde06887cc6893f650f52abcf1c9a08627d52.zip
lib: Fix Python wrapping
Since Python 3.6, the headers are no longer C89 compliant, since they introduced C++ style comments. This sets the compiler flag to std99 instead of std89 to allow wrapping of headers. It also adds a missing header to the wrapping file.
Diffstat (limited to 'include/ouroboros/wrap/CMakeLists.txt')
-rw-r--r--include/ouroboros/wrap/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ouroboros/wrap/CMakeLists.txt b/include/ouroboros/wrap/CMakeLists.txt
index 16c86611..7753ca02 100644
--- a/include/ouroboros/wrap/CMakeLists.txt
+++ b/include/ouroboros/wrap/CMakeLists.txt
@@ -16,6 +16,9 @@ else ()
else ()
include_directories(${PYTHON_INCLUDE_PATH})
+ # Python assumes C99 since Python 3.6
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+
swig_add_module(ouroboros python ouroboros.i)
swig_link_libraries(ouroboros ${PYTHON_LIBRARIES} ouroboros)