Skip to content
Snippets Groups Projects
Commit 810862b4 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Run Swig always with -Werror; disable dispensable warnings.

parent 580862dc
No related branches found
No related tags found
No related merge requests found
// unproblematic warnings, keep them permanently disabled:
#pragma SWIG nowarn=314 // print conflicts with Python, renamed to _print
#pragma SWIG nowarn=315 // nothing known about std::size_t
#pragma SWIG nowarn=362 // operator=
#pragma SWIG nowarn=389 // operator[]
#pragma SWIG nowarn=473 // returning pointer in a director method (object ownership problem)
#pragma SWIG nowarn=503 // operator<<
#pragma SWIG nowarn=509 // overload ignored since reference=pointer
#pragma SWIG nowarn=520 // shared_ptr not declared for entire hierarchy [stackoverflow 11380483]
#pragma SWIG nowarn=362 // operator= ignored
#pragma SWIG nowarn=389 // operator[] ignored, consider %extend
#pragma SWIG nowarn=503 // operator= ignored, consider renaming to valid identifier
// questionable warnings, TODO: reinvestigate
#pragma SWIG nowarn=473 // questionable return pointer
#pragma SWIG nowarn=509 // overloaded method shadowed, effectively ignored
......@@ -27,7 +27,11 @@ function(SwigLib name lib TMP_DIR)
endforeach()
list(APPEND swig_dependencies ${AUTO_DIR}/doxygen${name}.i)
set(SWIG_FLAGS "-c++;-python;-o;${AUTO_DIR}/lib${lib}_wrap.cpp;-outdir;${TMP_DIR}"
# Run Swig.
# Please keep -Werror, in order not to overlook critical warnings.
# Dispensable warnings are disabled in Wrap/swig/warnigs.i.
# Joachim, oct20.
set(SWIG_FLAGS "-c++;-python;-Werror;-o;${AUTO_DIR}/lib${lib}_wrap.cpp;-outdir;${TMP_DIR}"
";-I${CMAKE_SOURCE_DIR};-I${CMAKE_BINARY_DIR}/inc")
add_custom_command(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment