From a198f47c06723fabef174cb3983b26ead24f5bc9 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 24 Nov 2015 23:18:44 +0100 Subject: cmake: add asn1 target, avoid unnecessary rebuilds Add an "asn1" build target that rebuilds all ASN.1 dissectors. Do not always generate the ASN.1 dissector when invoking the "generate_dissector-PROTO" target. Use a special "packet-PROTO-stamp" file to detect whether the dissector is out of date. This indirection is needed because cmake removes output files from add_custom_command in the clean target, but we would like to keep the generated packet-PROTO.c files. Make all EXTRA_CNF and EXPORT_DEPENDS point to absolute paths for generated exported configs (PROTO-exp.cnf). This is done by automake too and is needed for proper dependency tracking. Example: when h225.cnf is updated, h225-exp.cnf needs to be generated. That is the purpose of the "generate-h225-exp.cnf" target. Now h235 (and other) dissectors need to be regenerated as well because the h225-exp.cnf is updated. This is why there is a separate add_custom_command and add_custom_target. Change-Id: I8cfc1f8f43cea595267b21eae30b4548f3407c0b Reviewed-on: https://code.wireshark.org/review/12080 Reviewed-by: Peter Wu Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin Reviewed-by: Anders Broman --- asn1/h225/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asn1/h225') diff --git a/asn1/h225/CMakeLists.txt b/asn1/h225/CMakeLists.txt index fe5fe4517f..5a15337e11 100644 --- a/asn1/h225/CMakeLists.txt +++ b/asn1/h225/CMakeLists.txt @@ -49,8 +49,8 @@ set( SRC_FILES set( A2W_FLAGS ) set( EXTRA_CNF - h235-exp.cnf - h245-exp.cnf + "${CMAKE_CURRENT_BINARY_DIR}/../h235/h235-exp.cnf" + "${CMAKE_CURRENT_BINARY_DIR}/../h245/h245-exp.cnf" ) ASN2WRS() -- cgit v1.2.1