aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-01-12 12:43:18 +0100
committerPeter Wu <peter@lekensteyn.nl>2019-01-12 18:20:44 +0000
commit5cc461490d817be898629562b947099a9996f198 (patch)
tree9cfaacf58b9653170006688fcb7d28b89be03451 /fuzz
parent6d08cb2ecd51dceefb49ff65532e0ca4de4ad417 (diff)
CMake: use object libraries to avoid redundant builds
Some source files are duplicated via add_executable. Assuming that these are not affected by target-specific preprocessor macros, they can be built only once and shared among executables. In one configuration, this reduces the number of object files by 55 (cli_main.c and version_info.c alone were built 15 times each). Removes the version dependency from each target since the 'version_info' target can now declare this dependency. Remove CLEAN_C_FILES from extcap since it is not used to set -Werror. Due to removing some files from wireshark_FILES (and others), these are no longer part of checkAPIs though. Hopefully that is acceptable. Change-Id: I0a3f1ffb950e70a6176c96d867f694fbc6476f58 Reviewed-on: https://code.wireshark.org/review/31509 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/fuzz/CMakeLists.txt b/fuzz/CMakeLists.txt
index 127d7f153c..fc9bb1d965 100644
--- a/fuzz/CMakeLists.txt
+++ b/fuzz/CMakeLists.txt
@@ -40,7 +40,7 @@ if(OSS_FUZZ)
endif()
set(fuzzshark_FILES
fuzzshark.c
- ${CMAKE_SOURCE_DIR}/version_info.c
+ $<TARGET_OBJECTS:version_info>
)
set(FUZZ_LINK_FLAGS "${WS_LINK_FLAGS}")
if(ENABLE_FUZZER)
@@ -63,7 +63,6 @@ string(REPLACE ";" ", " FUZZ_DISABLED_DISSECTORS_MACRO "${FUZZ_DISABLED_DISSECTO
add_custom_target(all-fuzzers)
function(fuzzshark_set_common_options fuzzer_name)
- add_dependencies(${fuzzer_name} version)
# Sanitizers require a C++ runtime, so use a C++ linker.
set_target_properties(${fuzzer_name} PROPERTIES
FOLDER "Fuzzers"