void-packages/srcpkgs/kdevelop/patches/use-std-c99.patch

17 lines
573 B
Diff

KDECompilerSettings (of extra-cmake-modules 5.40) sets "-std=iso9899:1990" that is
too restrictive for C build with Qt *.h files: comments in c++ style.
Let's use C99 instead.
--- CMakeLists.txt.ORIG
+++ CMakeLists.txt
@@ -21,6 +21,9 @@
endif()
include(KDECompilerSettings NO_POLICY_SCOPE) # needs to be first, as set policies influence following macros
+string(REPLACE " -std=iso9899:1990" "" CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} ")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+
include(ECMOptionalAddSubdirectory)
include(ECMInstallIcons)
include(ECMAddAppIcon)