From 534787e402d6aa8b349638f911a2a65b013c6594 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 30 Sep 2016 16:06:15 +0200 Subject: cmake: make WERROR_COMMON_FLAGS a normal string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of checking for the boolean "FALSE", just set an empty string. This avoids the need to check for WERROR_COMMON_FLAGS before using it. The transformation is the same for all files, remove "if (WERROR_COMMON_FLAGS)" and "endif()", reindent and add quotes (since we have a string here and not a list). Modelines have been added where missing. Change-Id: I0ab05ae507c51fa77336d49a99a226399cc81b92 Reviewed-on: https://code.wireshark.org/review/17997 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde Reviewed-by: Dario Lombardo Tested-by: Dario Lombardo --- CMakeLists.txt | 17 +++++++---------- capchild/CMakeLists.txt | 25 ++++++++++++++++++------- caputils/CMakeLists.txt | 25 ++++++++++++++++++------- echld/CMakeLists.txt | 25 ++++++++++++++++++------- epan/CMakeLists.txt | 12 +++++------- epan/crypt/CMakeLists.txt | 12 +++++------- epan/dfilter/CMakeLists.txt | 12 +++++------- epan/dissectors/CMakeLists.txt | 12 +++++------- epan/dissectors/dcerpc/CMakeLists.txt | 12 +++++------- epan/ftypes/CMakeLists.txt | 12 +++++------- epan/nghttp2/CMakeLists.txt | 12 +++++------- epan/wmem/CMakeLists.txt | 12 +++++------- epan/wslua/CMakeLists.txt | 12 +++++------- plugins/docsis/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/ethercat/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/gryphon/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/irda/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/m2m/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/mate/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/opcua/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/profinet/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/stats_tree/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/tpg/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/unistim/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/wimax/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/wimaxasncp/CMakeLists.txt | 25 ++++++++++++++++++------- plugins/wimaxmacphy/CMakeLists.txt | 25 ++++++++++++++++++------- randpkt_core/CMakeLists.txt | 25 ++++++++++++++++++------- tools/lemon/CMakeLists.txt | 25 ++++++++++++++++++------- ui/CMakeLists.txt | 12 +++++------- ui/gtk/CMakeLists.txt | 12 +++++------- ui/qt/CMakeLists.txt | 12 +++++------- wiretap/CMakeLists.txt | 25 ++++++++++++++++++------- writecap/CMakeLists.txt | 25 ++++++++++++++++++------- wsutil/CMakeLists.txt | 31 ++++++++----------------------- 35 files changed, 453 insertions(+), 264 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0530ee359e..988ca8577e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -595,10 +595,11 @@ if(ENABLE_ASAN) set(CMAKE_CXX_FLAGS "-fsanitize=address ${CMAKE_CXX_FLAGS}") endif() +set(WERROR_COMMON_FLAGS "") +set(NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS "") if(NOT DISABLE_WERROR AND NOT ENABLE_EXTRA_COMPILER_WARNINGS) if(CMAKE_C_COMPILER_ID MATCHES "MSVC") set(WERROR_COMMON_FLAGS "/WX") - set(NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS) else() check_c_compiler_flag(-Werror WERROR) if (WERROR) @@ -606,8 +607,6 @@ if(NOT DISABLE_WERROR AND NOT ENABLE_EXTRA_COMPILER_WARNINGS) set(NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS "-Wno-error=deprecated-declarations") endif() endif() -else() - set(WERROR_COMMON_FLAGS FALSE) endif() # @@ -2620,13 +2619,11 @@ set(CLEAN_FILES ${udpdump_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) install( FILES diff --git a/capchild/CMakeLists.txt b/capchild/CMakeLists.txt index af51706305..b470a4db08 100644 --- a/capchild/CMakeLists.txt +++ b/capchild/CMakeLists.txt @@ -30,13 +30,11 @@ set(CLEAN_FILES ${CAPCHILD_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) file(GLOB CAPCHILD_HEADERS capture_session.h) @@ -66,3 +64,16 @@ CHECKAPI( SOURCES ${CAPCHILD_SRC} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/caputils/CMakeLists.txt b/caputils/CMakeLists.txt index c807fe0402..4536601495 100644 --- a/caputils/CMakeLists.txt +++ b/caputils/CMakeLists.txt @@ -52,13 +52,11 @@ set(CLEAN_FILES ${CAPUTILS_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(caputils STATIC @@ -86,3 +84,16 @@ CHECKAPI( SOURCES ${CAPUTILS_SRC} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/echld/CMakeLists.txt b/echld/CMakeLists.txt index d32663ed50..37db17fa68 100644 --- a/echld/CMakeLists.txt +++ b/echld/CMakeLists.txt @@ -39,13 +39,11 @@ set(ECHLD_FILES ${DIRTY_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(echld ${LINK_MODE_LIB} @@ -93,3 +91,16 @@ if(NOT ${ENABLE_STATIC}) ARCHIVE DESTINATION lib ) endif() + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 5cbd206d3d..25f8460d8c 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -209,13 +209,11 @@ set(CLEAN_FILES ${LIBWIRESHARK_ASM_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) # Cannot use $<$:$> as that breaks # get_target_property(_libwireshark_location epan LOCATION). diff --git a/epan/crypt/CMakeLists.txt b/epan/crypt/CMakeLists.txt index cb659c3998..a06aa60482 100644 --- a/epan/crypt/CMakeLists.txt +++ b/epan/crypt/CMakeLists.txt @@ -35,13 +35,11 @@ set(CRYPT_FILES ) source_group(crypt FILES ${CRYPT_FILES}) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CRYPT_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CRYPT_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(crypt OBJECT ${CRYPT_FILES} diff --git a/epan/dfilter/CMakeLists.txt b/epan/dfilter/CMakeLists.txt index b17fac891d..b4eb5fb46d 100644 --- a/epan/dfilter/CMakeLists.txt +++ b/epan/dfilter/CMakeLists.txt @@ -43,13 +43,11 @@ set(DFILTER_FILES ) source_group(dfilter FILES ${DFILTER_FILES}) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${DFILTER_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${DFILTER_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_lex_files(LEX_FILES GENERATED_FILES scanner.l diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt index 43a1ae23d7..c7f86c983a 100644 --- a/epan/dissectors/CMakeLists.txt +++ b/epan/dissectors/CMakeLists.txt @@ -1452,13 +1452,11 @@ set(CLEAN_FILES ${DISSECTOR_SUPPORT_SRC} ) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(dissectors OBJECT ${DISSECTOR_FILES} diff --git a/epan/dissectors/dcerpc/CMakeLists.txt b/epan/dissectors/dcerpc/CMakeLists.txt index 91ea454bf9..7ff0f5d678 100644 --- a/epan/dissectors/dcerpc/CMakeLists.txt +++ b/epan/dissectors/dcerpc/CMakeLists.txt @@ -33,13 +33,11 @@ set(CLEAN_FILES ${IDL2WRS_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_executable(idl2wrs ${IDL2WRS_FILES}) set_target_properties(idl2wrs PROPERTIES FOLDER "Executables") diff --git a/epan/ftypes/CMakeLists.txt b/epan/ftypes/CMakeLists.txt index 32b313e5b9..50df55c34b 100644 --- a/epan/ftypes/CMakeLists.txt +++ b/epan/ftypes/CMakeLists.txt @@ -41,13 +41,11 @@ set(FTYPE_FILES ) source_group(ftype FILES ${FTYPE_FILES}) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${FTYPE_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${FTYPE_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(ftypes OBJECT ${FTYPE_FILES} diff --git a/epan/nghttp2/CMakeLists.txt b/epan/nghttp2/CMakeLists.txt index 2166018228..9fb00ce584 100644 --- a/epan/nghttp2/CMakeLists.txt +++ b/epan/nghttp2/CMakeLists.txt @@ -35,13 +35,11 @@ set(NGHTTP2_FILES ) source_group(nghttp2 FILES ${NGHTTP2_FILES}) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${NGHTTP2_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${NGHTTP2_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(nghttp2 OBJECT ${NGHTTP2_FILES} diff --git a/epan/wmem/CMakeLists.txt b/epan/wmem/CMakeLists.txt index 52d798ad18..70d2251f27 100644 --- a/epan/wmem/CMakeLists.txt +++ b/epan/wmem/CMakeLists.txt @@ -44,13 +44,11 @@ set(WMEM_FILES ) source_group(wmem FILES ${WMEM_FILES}) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${WMEM_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${WMEM_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(wmem OBJECT ${WMEM_FILES} diff --git a/epan/wslua/CMakeLists.txt b/epan/wslua/CMakeLists.txt index 3e1ceb8075..6b200094af 100644 --- a/epan/wslua/CMakeLists.txt +++ b/epan/wslua/CMakeLists.txt @@ -65,13 +65,11 @@ set(WSLUA_FILES ) source_group(wslua FILES ${WSLUA_FILES}) -if(WERROR_COMMON_FLAGS) - set_source_files_properties( - ${WSLUA_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${WSLUA_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) # make-taps.pl depends on the current working directory # to find the dissector files (contents of taps file diff --git a/plugins/docsis/CMakeLists.txt b/plugins/docsis/CMakeLists.txt index 0f91e45a85..0a19f6623a 100644 --- a/plugins/docsis/CMakeLists.txt +++ b/plugins/docsis/CMakeLists.txt @@ -84,13 +84,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -117,3 +115,16 @@ CHECKAPI( ${DISSECTOR_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/ethercat/CMakeLists.txt b/plugins/ethercat/CMakeLists.txt index c50d900f47..c697d9bfb1 100644 --- a/plugins/ethercat/CMakeLists.txt +++ b/plugins/ethercat/CMakeLists.txt @@ -43,13 +43,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -76,3 +74,16 @@ CHECKAPI( ${DISSECTOR_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/gryphon/CMakeLists.txt b/plugins/gryphon/CMakeLists.txt index 352cddde3f..be1d6177b9 100644 --- a/plugins/gryphon/CMakeLists.txt +++ b/plugins/gryphon/CMakeLists.txt @@ -37,13 +37,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -70,3 +68,16 @@ CHECKAPI( ${DISSECTOR_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/irda/CMakeLists.txt b/plugins/irda/CMakeLists.txt index d035ab05d4..f0e75ae7ea 100644 --- a/plugins/irda/CMakeLists.txt +++ b/plugins/irda/CMakeLists.txt @@ -39,13 +39,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -72,3 +70,16 @@ CHECKAPI( ${DISSECTOR_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/m2m/CMakeLists.txt b/plugins/m2m/CMakeLists.txt index 02a69da0c6..6ee8f89293 100644 --- a/plugins/m2m/CMakeLists.txt +++ b/plugins/m2m/CMakeLists.txt @@ -42,13 +42,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -77,3 +75,16 @@ CHECKAPI( ${DISSECTOR_SUPPORT_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/mate/CMakeLists.txt b/plugins/mate/CMakeLists.txt index 16459c4c7a..3479bdd76d 100644 --- a/plugins/mate/CMakeLists.txt +++ b/plugins/mate/CMakeLists.txt @@ -60,13 +60,11 @@ set(CLEAN_FILES ${DISSECTOR_SUPPORT_CLEAN_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) register_dissector_files(plugin.c plugin @@ -96,3 +94,16 @@ CHECKAPI( # ${LEX_FILES} ${LEMON_FILES} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/opcua/CMakeLists.txt b/plugins/opcua/CMakeLists.txt index cedeaeedb3..4d63a0ec5a 100644 --- a/plugins/opcua/CMakeLists.txt +++ b/plugins/opcua/CMakeLists.txt @@ -52,13 +52,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -87,3 +85,16 @@ CHECKAPI( ${DISSECTOR_SUPPORT_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/profinet/CMakeLists.txt b/plugins/profinet/CMakeLists.txt index 56bff2ad74..b8f31f38a9 100644 --- a/plugins/profinet/CMakeLists.txt +++ b/plugins/profinet/CMakeLists.txt @@ -50,13 +50,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -85,3 +83,16 @@ CHECKAPI( ${DISSECTOR_SUPPORT_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/stats_tree/CMakeLists.txt b/plugins/stats_tree/CMakeLists.txt index 60283123fd..014ee6ad2f 100644 --- a/plugins/stats_tree/CMakeLists.txt +++ b/plugins/stats_tree/CMakeLists.txt @@ -33,13 +33,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_plugin_library(stats_tree) @@ -59,3 +57,16 @@ CHECKAPI( ${CLEAN_FILES} ${PLUGIN_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/tpg/CMakeLists.txt b/plugins/tpg/CMakeLists.txt index adc99729b4..cc888584cd 100644 --- a/plugins/tpg/CMakeLists.txt +++ b/plugins/tpg/CMakeLists.txt @@ -33,13 +33,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -79,3 +77,16 @@ install(TARGETS tpg RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/plugins/${CPACK_PACKAGE_VERSION} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/unistim/CMakeLists.txt b/plugins/unistim/CMakeLists.txt index b937e09872..aea02ea291 100644 --- a/plugins/unistim/CMakeLists.txt +++ b/plugins/unistim/CMakeLists.txt @@ -37,13 +37,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -70,3 +68,16 @@ CHECKAPI( ${DISSECTOR_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/wimax/CMakeLists.txt b/plugins/wimax/CMakeLists.txt index f7cffbca18..b59b818ec3 100644 --- a/plugins/wimax/CMakeLists.txt +++ b/plugins/wimax/CMakeLists.txt @@ -82,13 +82,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -117,3 +115,16 @@ CHECKAPI( ${DISSECTOR_SUPPORT_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/wimaxasncp/CMakeLists.txt b/plugins/wimaxasncp/CMakeLists.txt index 277c2e3796..a5509e116c 100644 --- a/plugins/wimaxasncp/CMakeLists.txt +++ b/plugins/wimaxasncp/CMakeLists.txt @@ -37,13 +37,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_lex_files(LEX_FILES GENERATED_FILES wimaxasncp_dict.l @@ -77,3 +75,16 @@ CHECKAPI( # LEX files commented out due to use of malloc, free etc. # ${LEX_FILES} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/plugins/wimaxmacphy/CMakeLists.txt b/plugins/wimaxmacphy/CMakeLists.txt index 344ebb0ed1..686d10a1ef 100644 --- a/plugins/wimaxmacphy/CMakeLists.txt +++ b/plugins/wimaxmacphy/CMakeLists.txt @@ -37,13 +37,11 @@ set(CLEAN_FILES ${PLUGIN_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -70,3 +68,16 @@ CHECKAPI( ${DISSECTOR_SRC} ${DISSECTOR_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/randpkt_core/CMakeLists.txt b/randpkt_core/CMakeLists.txt index 60775fd1bb..dc88b07e55 100644 --- a/randpkt_core/CMakeLists.txt +++ b/randpkt_core/CMakeLists.txt @@ -28,13 +28,11 @@ set(CLEAN_FILES ${RANDPKT_CORE_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) file(GLOB RANDPKT_CORE_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" randpkt_core.h) @@ -65,3 +63,16 @@ CHECKAPI( ${RANDPKT_CORE_SRC} ${RANDPKT_CORE_HEADERS} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/tools/lemon/CMakeLists.txt b/tools/lemon/CMakeLists.txt index 3b44764c6e..bba72c3450 100644 --- a/tools/lemon/CMakeLists.txt +++ b/tools/lemon/CMakeLists.txt @@ -27,13 +27,11 @@ set(CLEAN_FILES ${lemon_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) set(lemon_LIBS # Do we need something here on any platform? @@ -44,3 +42,16 @@ set_target_properties(lemon PROPERTIES FOLDER "tools") set_target_properties(lemon PROPERTIES COMPILE_OPTIONS "${WS_WARNINGS_C_FLAGS}") target_link_libraries(lemon ${lemon_LIBS}) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index f2ab675294..334e5f3257 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -80,13 +80,11 @@ set(CLEAN_FILES ${COMMON_UI_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(ui STATIC diff --git a/ui/gtk/CMakeLists.txt b/ui/gtk/CMakeLists.txt index 806cc49842..7864570d9d 100644 --- a/ui/gtk/CMakeLists.txt +++ b/ui/gtk/CMakeLists.txt @@ -227,13 +227,11 @@ set(CLEAN_FILES ${WIRESHARK_TAP_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS "${WERROR_COMMON_FLAGS} ${NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS}" - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS} ${NO_ERROR_DEPRECATED_DECLARATIONS_COMPILE_FLAGS}" +) if (ENABLE_GTK3) add_definitions( diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index 5d7d06a223..84a2b44e1b 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -508,13 +508,11 @@ add_custom_target( ) set_target_properties(translations PROPERTIES FOLDER "UI") -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${WIRESHARK_QT_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${WIRESHARK_QT_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_definitions(${QT_DEFINITIONS}) diff --git a/wiretap/CMakeLists.txt b/wiretap/CMakeLists.txt index bb89c5c4fb..5ff2f1ef39 100644 --- a/wiretap/CMakeLists.txt +++ b/wiretap/CMakeLists.txt @@ -84,13 +84,11 @@ set(WIRETAP_FILES ${CMAKE_SOURCE_DIR}/ws_version_info.c ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${WIRETAP_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${WIRETAP_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_lex_files(LEX_FILES GENERATED_FILES ascend_scanner.l @@ -168,3 +166,16 @@ CHECKAPI( # ${LEX_FILES} ${YACC_FILES} ) + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/writecap/CMakeLists.txt b/writecap/CMakeLists.txt index 642adddf4b..42483f93af 100644 --- a/writecap/CMakeLists.txt +++ b/writecap/CMakeLists.txt @@ -27,13 +27,11 @@ set(CLEAN_FILES ${WRITECAP_SRC} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) add_library(writecap STATIC @@ -44,3 +42,16 @@ set_target_properties(writecap PROPERTIES COMPILE_OPTIONS "${WS_WARNINGS_C_FLAGS}" LINK_FLAGS "${WS_LINK_FLAGS}" FOLDER "Libs") + +# +# Editor modelines - http://www.wireshark.org/tools/modelines.html +# +# Local variables: +# c-basic-offset: 8 +# tab-width: 8 +# indent-tabs-mode: t +# End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 2f71d0fc72..539126df04 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -189,33 +189,18 @@ set(CLEAN_FILES ${WSUTIL_FILES} ) -if (WERROR_COMMON_FLAGS) - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS ${WERROR_COMMON_FLAGS} - ) -else() - # - # Set the property to an empty string, so that if we try - # to get it below, it succeeds. - # - set_source_files_properties( - ${CLEAN_FILES} - PROPERTIES - COMPILE_FLAGS "" - ) -endif() +set_source_files_properties( + ${CLEAN_FILES} + PROPERTIES + COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" +) if (HAVE_SSE4_2) - get_source_file_property( - WS_MEMPBRK_SSE42_COMPILE_FLAGS - ws_mempbrk_sse42.c - COMPILE_FLAGS - ) + # TODO with CMake 2.8.12, we could use COMPILE_OPTIONS and just append + # instead of this COMPILE_FLAGS duplication... set_source_files_properties( ws_mempbrk_sse42.c PROPERTIES - COMPILE_FLAGS "${WS_MEMPBRK_SSE42_COMPILE_FLAGS} ${SSE4_2_FLAG}" + COMPILE_FLAGS "${WERROR_COMMON_FLAGS} ${SSE4_2_FLAG}" ) endif() -- cgit v1.2.1