summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-03-24 09:30:53 -0700
committerGerald Combs <gerald@wireshark.org>2016-03-24 18:41:39 +0000
commit1e41221f3128d548cdd158a884b262222689037c (patch)
tree46df6aa2e57dca5193d760e1cd8a5ee75f2042dd /cmake
parent3992f5a8de958b148207c076f4a3b08a7b981c80 (diff)
downloadwireshark-1e41221f3128d548cdd158a884b262222689037c.tar.gz
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 <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/UseAsn2Wrs.cmake6
1 files 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_")