+if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+ addflags("-Werror")
+ addflags("-pedantic-errors")
+ set(CMAKE_VERBOSE_MAKEFILE ON)
+ addflags(-fstack-protector -fstack-protector-strong -fstack-protector-all)
+ #addflags("-fsanitize=address,undefined") # break __asan::ReportGenericError
+
+ #add_definitions(-D_GLIBCXX_DEBUG=1)
+ #add_definitions(-D_GLIBCXX_DEBUG_PEDANTIC=1)
+endif ()
+
+addflags("-Wall")
+addflags("-Wextra")
+addflags("-pedantic")
+
+addflags_c("-Wno-deprecated-declarations") # vfs.c: g_strdown
+addflags_cxx("-Wno-deprecated-declarations") # various gtk
+
+addflags("-Wno-unused-function")
+addflags("-Wno-unused-variable")
+addflags("-Wno-unused-parameter")
+