Don't have CLEAN_FILES variables for the "clean" source files.

Except for the one directory that (currently) has "not yet clean" files,
epan/dissectors, we don't need a separate variable to keep track of the
"clean" source files.

In the cases where not all files were in CLEAN_FILES, put them into the
variable used to enable -Werror or its equivalent.

Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b
Reviewed-on: https://code.wireshark.org/review/25830
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2018-02-16 18:22:31 -08:00
parent 5f0d50690a
commit 459bd4646d
22 changed files with 48 additions and 145 deletions

View File

@ -26,12 +26,8 @@ set(CAPCHILD_SRC
capture_sync.c
)
set(CLEAN_FILES
${CAPCHILD_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
${CAPCHILD_SRC}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -48,12 +48,8 @@ if (AIRPCAP_FOUND)
)
endif()
set(CLEAN_FILES
${CAPUTILS_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
${CAPUTILS_SRC}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -39,12 +39,8 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -33,12 +33,8 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -35,12 +35,8 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -36,10 +36,6 @@ set(DISSECTOR_SUPPORT_SRC
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
set(DISSECTOR_SUPPORT_CLEAN_SRC
${DISSECTOR_SUPPORT_SRC}
)
add_lemon_files(LEMON_FILES GENERATED_FILES
mate_grammar.lemon
)
@ -54,14 +50,8 @@ set(PLUGIN_FILES
${GENERATED_FILES}
)
set(CLEAN_FILES
plugin.c
${DISSECTOR_SRC}
${DISSECTOR_SUPPORT_CLEAN_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -48,12 +48,8 @@ set(PLUGIN_FILES
${DISSECTOR_SUPPORT_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -45,18 +45,12 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
set_source_files_properties(
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS ${WERROR_COMMON_FLAGS}
)
if (WERROR_COMMON_FLAGS)
set_source_files_properties(
${CLEAN_FILES}
PROPERTIES
COMPILE_FLAGS ${WERROR_COMMON_FLAGS}
)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})

View File

@ -46,12 +46,8 @@ set(PLUGIN_FILES
${DISSECTOR_SUPPORT_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -29,12 +29,8 @@ set(PLUGIN_FILES
pinfo_stats_tree.c
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
@ -52,7 +48,7 @@ CHECKAPI(
SWITCHES
-g abort -g termoutput -build
SOURCES
${CLEAN_FILES}
${PLUGIN_FILES}
${PLUGIN_HEADERS}
)

View File

@ -39,12 +39,8 @@ set(PLUGIN_FILES
${DISSECTOR_SUPPORT_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -33,12 +33,8 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -79,12 +79,8 @@ set(PLUGIN_FILES
${DISSECTOR_SUPPORT_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -33,21 +33,16 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
add_lex_files(LEX_FILES PLUGIN_FILES
wimaxasncp_dict.l
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
add_lex_files(LEX_FILES GENERATED_FILES
wimaxasncp_dict.l
)
list(APPEND PLUGIN_FILES ${GENERATED_FILES})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
register_plugin_files(plugin.c

View File

@ -33,12 +33,8 @@ set(PLUGIN_FILES
${DISSECTOR_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -21,12 +21,8 @@ set(PLUGIN_FILES
${WIRETAP_SRC}
)
set(CLEAN_FILES
${PLUGIN_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${PLUGIN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -24,12 +24,8 @@ set(RANDPKT_CORE_SRC
randpkt_core.c
)
set(CLEAN_FILES
${RANDPKT_CORE_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
${RANDPKT_CORE_SRC}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -23,12 +23,8 @@ set(lemon_FILES
lemon.c
)
set(CLEAN_FILES
${lemon_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${lemon_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS} ${NO_SANITIZE_CFLAGS}"
)

View File

@ -19,7 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
set(COMMON_UI_SRC
set(NONGENERATED_UI_SRC
alert_box.c
capture.c
capture_ui_utils.c
@ -73,25 +73,20 @@ file(GLOB EXTRA_UI_HEADERS
tap-rtp-analysis.h
)
add_lex_files(LEX_FILES GENERATED_FILES
set(UI_SRC ${NONGENERATED_UI_SRC})
add_lex_files(LEX_FILES UI_SRC
text_import_scanner.l
)
set(CLEAN_FILES
${COMMON_UI_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
${UI_SRC}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)
add_library(ui STATIC
${COMMON_UI_SRC}
${GENERATED_FILES}
)
add_library(ui STATIC ${UI_SRC})
set_target_properties(ui PROPERTIES
LINK_FLAGS "${WS_LINK_FLAGS}"
@ -115,9 +110,8 @@ CHECKAPI(
SWITCHES
-g deprecated-gtk
SOURCES
${COMMON_UI_SRC}
# LEX files commented out due to use of malloc, free etc.
# ${LEX_FILES}
${NONGENERATED_UI_SRC}
# Flex files not included due to use of malloc, free etc.
)
CHECKAPI(
NAME
@ -125,9 +119,8 @@ CHECKAPI(
SWITCHES
-M -g deprecated-gtk-todo
SOURCES
${COMMON_UI_SRC}
# LEX files commented out due to use of malloc, free etc.
# ${LEX_FILES}
${NONGENERATED_UI_SRC}
# Flex files not included due to use of malloc, free etc.
)
#

View File

@ -218,17 +218,6 @@ set(WIRESHARK_TAP_SRC
${WIRESHARK_CUSTOM_TAP_SRC}
)
set(CLEAN_FILES
${WIRESHARK_GTK_SRC}
${WIRESHARK_TAP_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS} ${NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS}"
)
if (ENABLE_GTK3)
add_definitions(
${GTK3_DEFINITIONS}
@ -259,6 +248,18 @@ if(WIN32)
)
endif()
set(GTKUI_FILES
${WIRESHARK_GTK_SRC}
${WIRESHARK_TAP_SRC}
${PLATFORM_UI_SRC}
)
set_source_files_properties(
${GTKUI_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS} ${NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS}"
)
register_tap_files(wireshark-tap-register.c
${WIRESHARK_TAP_SRC}
)
@ -303,9 +304,7 @@ else()
endif()
add_library(gtkui STATIC
${WIRESHARK_GTK_SRC}
${WIRESHARK_TAP_SRC}
${PLATFORM_UI_SRC}
${GTKUI_FILES}
${PORTAUDIO_OBJ}
wireshark-tap-register.c
${PIXBUF_SRC}

View File

@ -23,12 +23,8 @@ set(WRITECAP_SRC
pcapio.c
)
set(CLEAN_FILES
${WRITECAP_SRC}
)
set_source_files_properties(
${CLEAN_FILES}
${WRITECAP_SRC}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

View File

@ -248,12 +248,8 @@ IF(WIN32)
set(wsutil_LIBS ${wsutil_LIBS} "iphlpapi.lib" "ws2_32.lib")
ENDIF(WIN32)
set(CLEAN_FILES
${WSUTIL_FILES}
)
set_source_files_properties(
${CLEAN_FILES}
${WSUTIL_FILES}
PROPERTIES
COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)