aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2016-09-30 16:06:15 +0200
committerDario Lombardo <lomato@gmail.com>2016-09-30 20:08:02 +0000
commit534787e402d6aa8b349638f911a2a65b013c6594 (patch)
tree9cfaeb38a16eab0fee86b3b0fb8f9245c7813f7a /epan
parent53c91974c7e8f77555920e137cab80b5418e992b (diff)
cmake: make WERROR_COMMON_FLAGS a normal string
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 <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Dario Lombardo <lomato@gmail.com> Tested-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/CMakeLists.txt12
-rw-r--r--epan/crypt/CMakeLists.txt12
-rw-r--r--epan/dfilter/CMakeLists.txt12
-rw-r--r--epan/dissectors/CMakeLists.txt12
-rw-r--r--epan/dissectors/dcerpc/CMakeLists.txt12
-rw-r--r--epan/ftypes/CMakeLists.txt12
-rw-r--r--epan/nghttp2/CMakeLists.txt12
-rw-r--r--epan/wmem/CMakeLists.txt12
-rw-r--r--epan/wslua/CMakeLists.txt12
9 files changed, 45 insertions, 63 deletions
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 $<$<BOOL:${HAVE_LIBLUA}>:$<TARGET_OBJECTS:wslua>> 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