summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-12 15:26:34 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-04-12 15:27:36 (GMT)
commitf2376a5622e11279e2548aa515eff1ccca0d3bf0 (patch)
tree9400658a2661a5921e045daf40c8ffe8de77724b /Modules
parent580822fa67acb10ff6802248909ac602ef3eb1fe (diff)
parent9174786008c12a2eaf6180d536f9be4c13d94cb8 (diff)
downloadCMake-f2376a5622e11279e2548aa515eff1ccca0d3bf0.zip
CMake-f2376a5622e11279e2548aa515eff1ccca0d3bf0.tar.gz
CMake-f2376a5622e11279e2548aa515eff1ccca0d3bf0.tar.bz2
Merge topic 'FindwxWidgets-local-var'
9174786008 FindwxWidgets: Use more private name for local variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1951
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindwxWidgets.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index af997ea..f2d6285 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -925,14 +925,16 @@ unset(_wx_lib_missing)
# Check if a specific version was requested by find_package().
if(wxWidgets_FOUND)
- find_file(_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
- dbg_msg("_filename: ${_filename}")
+ unset(_wx_filename)
+ find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
+ dbg_msg("_wx_filename: ${_wx_filename}")
- if(NOT _filename)
+ if(NOT _wx_filename)
message(FATAL_ERROR "wxWidgets wx/version.h file not found in ${wxWidgets_INCLUDE_DIRS}.")
endif()
- file(READ ${_filename} _wx_version_h)
+ file(READ "${_wx_filename}" _wx_version_h)
+ unset(_wx_filename CACHE)
string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*"
"\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" )