mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix compiler warning issues
- add -Wno-deprecated-declarations to CXX_FLAGS as well. This was reported by vorlonofportland in PR#401 to become necessary for glib 2.58 as that has deprecated g_type_class_add_private which appears in our c++ code. - change -Wno-deprecated-register into -Wregister. The former appeared to be a clang dialect and alias for the latter (see https://github.com/Barro/compiler-warnings for an overview of clang and gcc warnings). It was moved to global CXX_FLAGS as it can only be added for g++.
This commit is contained in:
parent
bf00330eed
commit
4c87dd05ec
@ -572,8 +572,9 @@ set(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}") # FIXME: should be -std=
|
||||
|
||||
if (UNIX)
|
||||
set( CMAKE_C_FLAGS "-Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused ${CMAKE_C_FLAGS}")
|
||||
set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses ${CMAKE_CXX_FLAGS}")
|
||||
set( CMAKE_C_FLAGS "-Wno-deprecated-declarations -std=gnu11 -Wno-error=parentheses ${CMAKE_C_FLAGS}")
|
||||
set( CMAKE_CXX_FLAGS "-Werror -Wall -Wmissing-declarations -Wno-unused -Wno-error=parentheses ${CMAKE_CXX_FLAGS}")
|
||||
set( CMAKE_CXX_FLAGS "-Wno-deprecated-declarations -Wno-register ${CMAKE_CXX_FLAGS}")
|
||||
set( CMAKE_C_FLAGS_RELEASE "-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS}")
|
||||
endif (UNIX)
|
||||
if (MINGW)
|
||||
|
@ -235,7 +235,6 @@ add_dependencies (gncmod-engine swig-runtime-h iso-4217-c)
|
||||
target_link_libraries(gncmod-engine gnc-core-utils gnc-module ${Boost_DATE_TIME_LIBRARIES} ${Boost_REGEX_LIBRARIES} ${REGEX_LDFLAGS} ${GMODULE_LDFLAGS} ${GLIB2_LDFLAGS} ${GOBJECT_LDFLAGS} ${GUILE_LDFLAGS})
|
||||
|
||||
target_compile_definitions (gncmod-engine PRIVATE -DG_LOG_DOMAIN=\"gnc.engine\")
|
||||
target_compile_options (gncmod-engine PRIVATE -Wno-deprecated-register)
|
||||
|
||||
target_include_directories (gncmod-engine
|
||||
PRIVATE ${CMAKE_CURRENT_BINARY_DIR} # for iso-4217-currencies.c
|
||||
|
Loading…
Reference in New Issue
Block a user