diff options
author | Brad King <brad.king@kitware.com> | 2018-04-12 15:26:34 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-12 15:27:36 (GMT) |
commit | f2376a5622e11279e2548aa515eff1ccca0d3bf0 (patch) | |
tree | 9400658a2661a5921e045daf40c8ffe8de77724b /Modules | |
parent | 580822fa67acb10ff6802248909ac602ef3eb1fe (diff) | |
parent | 9174786008c12a2eaf6180d536f9be4c13d94cb8 (diff) | |
download | CMake-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.cmake | 10 |
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}" ) |