[geany/geany-plugins] 3d0c51: cppcheck: Set Geany include path for it to find header files

Colomban Wendling git-noreply at xxxxx
Sun Feb 2 19:19:45 UTC 2020


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Sun, 02 Feb 2020 19:19:45 UTC
Commit:      3d0c513d57f5de8bf568dd642e330a746439759f
             https://github.com/geany/geany-plugins/commit/3d0c513d57f5de8bf568dd642e330a746439759f

Log Message:
-----------
cppcheck: Set Geany include path for it to find header files

This fixes build with recent versions of cppcheck with some plugins
using PLUGIN_VERSION_CHECK() macro, like the latex plugin.


Modified Paths:
--------------
    build/cppcheck.m4
    build/cppcheck.mk

Modified: build/cppcheck.m4
4 lines changed, 4 insertions(+), 0 deletions(-)
===================================================================
@@ -21,4 +21,8 @@ AC_DEFUN([GP_CHECK_CPPCHECK],
     AM_CONDITIONAL([HAVE_CPPCHECK], [test "x$gp_have_cppcheck" = xyes])
     GP_STATUS_BUILD_FEATURE_ADD([Static code checking],
                                 [$gp_have_cppcheck])
+
+    GP_GEANY_PKG_CONFIG_PATH_PUSH
+    PKG_CHECK_VAR([GEANY_INCLUDEDIR], [geany], [includedir], [], [])
+    GP_GEANY_PKG_CONFIG_PATH_POP
 ])


Modified: build/cppcheck.mk
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -4,6 +4,7 @@ if HAVE_CPPCHECK
 check-cppcheck: $(srcdir)
 	$(CPPCHECK) \
 		-q --template gcc --error-exitcode=2 \
+		-I$(GEANY_INCLUDEDIR)/geany \
 		$(AM_CPPCHECKFLAGS) $(CPPCHECKFLAGS) \
 		$(srcdir)
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list