summaryrefslogtreecommitdiff
path: root/wsutil/CMakeLists.txt
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 /wsutil/CMakeLists.txt
parent231f6b5035e4f001eca22029b58cf4c498d624bd (diff)
downloadwireshark-2e23b506c766d98966ed213c760b2aa6232ba1fe.tar.gz
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 'wsutil/CMakeLists.txt')
-rw-r--r--wsutil/CMakeLists.txt42
1 files changed, 26 insertions, 16 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index 209787a658..384bda65eb 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -21,15 +21,7 @@
include(UseABICheck)
-if(WIN32)
- set(WSUTIL_PLATFORM_FILES
- file_util.c
- inet_ntop.c
- inet_pton.c
- )
-ENDIF(WIN32)
-
-set(WSUTIL_FILES
+set(WSUTIL_COMMON_FILES
adler32.c
aes.c
airpdcap_wep.c
@@ -75,11 +67,20 @@ set(WSUTIL_FILES
type_util.c
unicode-utils.c
ws_mempbrk.c
- ${WSUTIL_PLATFORM_FILES}
)
+set(WSUTIL_FILES ${WSUTIL_COMMON_FILES})
+if(WIN32)
+ list(APPEND WSUTIL_FILES
+ file_util.c
+ inet_ntop.c
+ inet_pton.c
+ )
+ENDIF(WIN32)
+
+
if(HAVE_OS_X_FRAMEWORKS)
- set(WSUTIL_FILES ${WSUTIL_FILES} cfutils.c)
+ list(APPEND WSUTIL_FILES cfutils.c)
endif()
#
@@ -141,23 +142,23 @@ if(COMPILER_CAN_HANDLE_SSE4_2)
endif()
endif()
if(HAVE_SSE4_2)
- set(WSUTIL_FILES ${WSUTIL_FILES} ws_mempbrk_sse42.c)
+ list(APPEND WSUTIL_FILES ws_mempbrk_sse42.c)
endif()
if(NOT HAVE_GETOPT_LONG)
- set(WSUTIL_FILES ${WSUTIL_FILES} getopt_long.c)
+ list(APPEND WSUTIL_FILES getopt_long.c)
endif()
if(NOT HAVE_INET_ATON)
- set(WSUTIL_FILES ${WSUTIL_FILES} inet_aton.c)
+ list(APPEND WSUTIL_FILES inet_aton.c)
endif()
if(NOT HAVE_POPCOUNT)
- set(WSUTIL_FILES ${WSUTIL_FILES} popcount.c)
+ list(APPEND WSUTIL_FILES popcount.c)
endif()
if(NOT HAVE_STRPTIME)
- set(WSUTIL_FILES ${WSUTIL_FILES} strptime.c)
+ list(APPEND WSUTIL_FILES strptime.c)
endif()
if(APPLE)
@@ -259,6 +260,15 @@ endif()
add_definitions( -DTOP_SRCDIR=\"${CMAKE_SOURCE_DIR}\" )
+CHECKAPI(
+ NAME
+ wsutil
+ SWITCHES
+ -g termoutput -build
+ SOURCES
+ ${WSUTIL_COMMON_FILES}
+)
+
#
# Editor modelines - http://www.wireshark.org/tools/modelines.html
#