From 1e41221f3128d548cdd158a884b262222689037c Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 24 Mar 2016 09:30:53 -0700 Subject: CMake: Find asn2wrs.py once. Load LocatePythonModule and use it to find asn2wrs once instead of every time we cal the ASN2WRS function. This reduces the cmake run time by about 3 to 4 seconds here. Change-Id: I85f7dcca0b5891c9b4b23a76d017f8e504d6af60 Reviewed-on: https://code.wireshark.org/review/14614 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- cmake/modules/UseAsn2Wrs.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/modules/UseAsn2Wrs.cmake b/cmake/modules/UseAsn2Wrs.cmake index 9f3a3a93d7..d3718c806a 100644 --- a/cmake/modules/UseAsn2Wrs.cmake +++ b/cmake/modules/UseAsn2Wrs.cmake @@ -5,10 +5,10 @@ # source tree. For external dissectors, set it to the # absolute path (e.g. "${CMAKE_CURRENT_SOURCE_DIR}"). -function(ASN2WRS) - include(LocatePythonModule) - locate_python_module(asn2wrs REQUIRED PATHS "${CMAKE_SOURCE_DIR}/tools") +include(LocatePythonModule) +locate_python_module(asn2wrs REQUIRED PATHS "${CMAKE_SOURCE_DIR}/tools") +function(ASN2WRS) if(NOT PROTO_OPT) set(PROTO_OPT -p ${PROTOCOL_NAME}) elseif(PROTO_OPT STREQUAL "_EMPTY_") -- cgit v1.2.3