diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-03-12 13:40:56 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-03-13 06:07:25 +0000 |
commit | 1915ce613387c135ae8e3bc55190e3e7473313d2 (patch) | |
tree | 2530e0cfb5e96dd19e0d8e1978f09cbde14fb1c5 /cmake | |
parent | da05837004bf4d1eecc6ca63dd82dde480aa3354 (diff) |
CMake: Skip some header checks on Windows.
Skip some header checks on Windows when we're sure they will always
be true.
Change-Id: I4ff7c867b9268a53692085553055dcbc0f90ae1d
Reviewed-on: https://code.wireshark.org/review/26452
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindPCAP.cmake | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cmake/modules/FindPCAP.cmake b/cmake/modules/FindPCAP.cmake index 469a8347ac..c963e19ae0 100644 --- a/cmake/modules/FindPCAP.cmake +++ b/cmake/modules/FindPCAP.cmake @@ -53,6 +53,26 @@ if( PCAP_FOUND ) set( CMAKE_REQUIRED_INCLUDES ${PCAP_INCLUDE_DIRS} ) set( CMAKE_REQUIRED_LIBRARIES ${PCAP_LIBRARIES} ) + if(WIN32) + # Prepopulate some values. WinPcap and NPcap always have these and + # compilation checks on Windows can be slow. + set(HAVE_PCAP_OPEN_DEAD TRUE) + set(HAVE_PCAP_FREECODE TRUE) + set(HAVE_PCAP_BREAKLOOP TRUE) + set(HAVE_PCAP_CREATE TRUE) + set(HAVE_PCAP_DATALINK_NAME_TO_VAL TRUE) + set(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION TRUE) + set(HAVE_PCAP_DATALINK_VAL_TO_NAME TRUE) + set(HAVE_PCAP_FINDALLDEVS TRUE) + set(HAVE_PCAP_FREE_DATALINKS TRUE) + set(HAVE_PCAP_LIB_VERSION TRUE) + set(HAVE_PCAP_LIST_DATALINKS TRUE) + set(HAVE_PCAP_SET_DATALINK TRUE) + set(HAVE_BPF_IMAGE TRUE) + set(HAVE_PCAP_OPEN TRUE) + set(HAVE_PCAP_SETSAMPLING TRUE) + endif(WIN32) + check_function_exists( "pcap_open_dead" HAVE_PCAP_OPEN_DEAD ) check_function_exists( "pcap_freecode" HAVE_PCAP_FREECODE ) # @@ -63,7 +83,7 @@ if( PCAP_FOUND ) # check_function_exists( "pcap_breakloop" HAVE_PCAP_BREAKLOOP ) check_function_exists( "pcap_create" HAVE_PCAP_CREATE ) - if( HAVE_PCAP_CREATE OR WIN32 ) + if( HAVE_PCAP_CREATE ) # # If we have pcap_create(), we have pcap_set_buffer_size(), and # can set the capture buffer size. |