Don't have CLEAN_FILES variables for the "clean" source files.
authorGuy Harris <guy@alum.mit.edu>
Sat, 17 Feb 2018 02:22:31 +0000 (18:22 -0800)
committerGuy Harris <guy@alum.mit.edu>
Sat, 17 Feb 2018 02:50:24 +0000 (02:50 +0000)
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>
22 files changed:
capchild/CMakeLists.txt
caputils/CMakeLists.txt
plugins/epan/ethercat/CMakeLists.txt
plugins/epan/gryphon/CMakeLists.txt
plugins/epan/irda/CMakeLists.txt
plugins/epan/mate/CMakeLists.txt
plugins/epan/opcua/CMakeLists.txt
plugins/epan/pluginifdemo/CMakeLists.txt
plugins/epan/profinet/CMakeLists.txt
plugins/epan/stats_tree/CMakeLists.txt
plugins/epan/transum/CMakeLists.txt
plugins/epan/unistim/CMakeLists.txt
plugins/epan/wimax/CMakeLists.txt
plugins/epan/wimaxasncp/CMakeLists.txt
plugins/epan/wimaxmacphy/CMakeLists.txt
plugins/wiretap/usbdump/CMakeLists.txt
randpkt_core/CMakeLists.txt
tools/lemon/CMakeLists.txt
ui/CMakeLists.txt
ui/gtk/CMakeLists.txt
writecap/CMakeLists.txt
wsutil/CMakeLists.txt

index 1a71b4f6a802208d1798499a686b760840df4f0c..92bbbb8f6f9b26143a6fa967d5951d97b640ae1b 100644 (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}"
 )
index ec0c6a7c47cd92a5719d879a83a8049ff3b5c45f..ef1cfebee006bf5fbfd8fb156b806569492122fd 100644 (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}"
 )
index 6dc62fdf9dba39658e5912cb446368a81ea0b16b..3b68d81df4ff6880a2d993e78d5ea306167c7e42 100644 (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}"
 )
index 3e19f43eaf565277d04572c3ab281c0b4af69b3c..cb67da4c26514fea325796e5f77b7ab0ecebb39a 100644 (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}"
 )
index a67568cbb3082d6f97dc8b9aae3a7e0a89f7e0b5..4a0307199e4d39b44da32ed18b343120a2c3cb4b 100644 (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}"
 )
index 6440f01b4101b161fc2e47576722bc16c767fde1..5a3f81ded7744c7cd79752dab5f75486d7e2f0e9 100644 (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}"
 )
index 9473ef1444014c0c98b90297537386b779016a8c..6ff5b41a0b0ffbc18b3a615441276887298dcd80 100644 (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}"
 )
index 341682aa3ac1d2b0f4caaf4faf4c7a1aa5b7b4bc..7237309f1e7dec96350816f466df42b2c34e863f 100644 (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})
 
index 581c6f9f73e4c5a39bec25c0f8ce42fbe70494ef..792076b6ef3361d53a953350e9c409b3b77f3a2c 100644 (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}"
 )
index 27cff790218ed7367fb7bcc89630283c8a176c7e..01f032594ddafa16d404a219084fcd12445ea52a 100644 (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}
 )
 
index 18eb54bd7cbb18618186a4d008faa4e9e333a5ef..7a205c56f14008d838c10cc347ba67136839a049 100644 (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}"
 )
index 6aeb7b84efd61bdffdaf9c81ce9de060a1eeb435..6f6b26a0b43195370f440b910a3776d804a7c3e4 100644 (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}"
 )
index 9419415cfcf22543187e849d491c754912fbccb3..84a9e69d7edb065a23a217d1b0b2cc77fd25ea5b 100644 (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}"
 )
index 36985207754b61c5e0be3517f0c1451368cad5d4..f56f127be17d6e423c677b62759bb9fb769d37a2 100644 (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
index efd819db188675a4823df0b6c0100ba6c41f8685..c8bd03e49fe6c3711ac57c032cab79442c8fae83 100644 (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}"
 )
index 2c6b22af8e2881e75258ac1318de03567fc8ec7b..9aae128b10192bf334655c3a4d1e7e7b64ba87e5 100644 (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}"
 )
index f7d5069e8df37007eba506a9fd153a15fa28ffb2..331198679a2aa514cb63604a0d8c954a97ed0dfe 100644 (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}"
 )
index a598e820b604d746bfccc726e5420846bbbb6a6d..1cfecd87111013dff4b6f8c88e658483156a3745 100644 (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}"
 )
index ea78f7830caa710de612ad84b6d199386e79e8b1..6c4d2c6944c026ff9ea84e57095518c8f3b4cc23 100644 (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
-       text_import_scanner.l
-)
+set(UI_SRC ${NONGENERATED_UI_SRC})
 
-set(CLEAN_FILES
-       ${COMMON_UI_SRC}
+add_lex_files(LEX_FILES UI_SRC
+       text_import_scanner.l
 )
 
 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.
 )
 
 #
index cc6b01e89e132d4a46df5068efce169f82eac3b7..173f02780c3ca19e3d509678b7cdabbf665d0635 100644 (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}
index 8d6ce4b88fdfff023db1b2f8283be2e2d83b5a8d..de2ff7439633c11425b794d7510e84aa47673c50 100644 (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}"
 )
index 407d27a2dd21395a7514fd6a63ae2965de4b57c2..bb75fd4dfd45ce82ceaffe8bbf5894593ad8a850 100644 (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}"
 )