aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2016-03-11 19:51:39 +0000
committerGraham Bloice <graham.bloice@trihedral.com>2016-05-02 12:01:24 +0000
commit2e23b506c766d98966ed213c760b2aa6232ba1fe (patch)
treee15eec1049e10419d869dea459730791ec2bc128 /plugins/mate
parent231f6b5035e4f001eca22029b58cf4c498d624bd (diff)
Add checkAPI calls to CMake.
This generates a top level target, checkAPI, that is excluded from the ALL build target, so must be run separately. On Windows using a Visual Studio generator, call msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj Change-Id: I44a57c564dcfc75499463b942436f4b920a82478 Reviewed-on: https://code.wireshark.org/review/14873 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'plugins/mate')
-rw-r--r--plugins/mate/CMakeLists.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/mate/CMakeLists.txt b/plugins/mate/CMakeLists.txt
index 6f3c35aa61..16459c4c7a 100644
--- a/plugins/mate/CMakeLists.txt
+++ b/plugins/mate/CMakeLists.txt
@@ -40,11 +40,10 @@ set(DISSECTOR_SUPPORT_CLEAN_SRC
${DISSECTOR_SUPPORT_SRC}
)
-add_lemon_files(DISSECTOR_SUPPORT_SRC
+add_lemon_files(LEMON_FILES GENERATED_FILES
mate_grammar.lemon
)
-
-add_lex_files(DISSECTOR_SUPPORT_SRC
+add_lex_files(LEX_FILES GENERATED_FILES
mate_parser.l
)
@@ -52,6 +51,7 @@ set(PLUGIN_FILES
plugin.c
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_SRC}
+ ${GENERATED_FILES}
)
set(CLEAN_FILES
@@ -81,3 +81,18 @@ install(TARGETS mate
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/plugins/${CPACK_PACKAGE_VERSION}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/plugins/${CPACK_PACKAGE_VERSION}
)
+
+file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h")
+CHECKAPI(
+ NAME
+ mate
+ SWITCHES
+ -g abort -g termoutput -build
+ SOURCES
+ ${DISSECTOR_SRC}
+ ${DISSECTOR_SUPPORT_SRC}
+ ${DISSECTOR_HEADERS}
+# LEX files commented out due to use of malloc, free etc.
+# ${LEX_FILES}
+ ${LEMON_FILES}
+)