mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Work around a conflict between gcc 8.0 and swig 3.0
The swig 3.0 generated python wrappers trigger a warning converted into an error issued by gcc 8.0 for using strncpy as follows: strncpy(buff, "swig_ptr: ", 10); The reason is this call will truncate the trailing null byte from the string. This appears to have been fixed in swig master already but that's not released yet so let disable the warning when compiling the swig wrappers until it is.
This commit is contained in:
@@ -116,6 +116,9 @@ if (WITH_PYTHON)
|
||||
|
||||
target_link_libraries(sw_app_utils gncmod-app-utils ${app_utils_ALL_LIBRARIES} ${PYTHON_LIBRARIES})
|
||||
set_target_properties(sw_app_utils PROPERTIES PREFIX "_")
|
||||
if (HAVE_STRINGOP_TRUNCATION)
|
||||
target_compile_options(sw_app_utils PRIVATE -Wno-error=stringop-truncation)
|
||||
endif()
|
||||
|
||||
target_include_directories (sw_app_utils
|
||||
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
||||
Reference in New Issue
Block a user