summaryrefslogtreecommitdiffstats
path: root/Modules/FindLua51.cmake
diff options
context:
space:
mode:
authorJuan Ramos <juan.ramos@kitware.com>2024-03-29 20:51:59 (GMT)
committerJuan Ramos <juan.ramos@kitware.com>2024-03-29 20:51:59 (GMT)
commit3cd64287fefd536561c155a0fbb1f549ab066d0e (patch)
treef8ad4a5d09c90dae7be0dec761f298fb330bfac8 /Modules/FindLua51.cmake
parent2e3692bde08c071fdb00f201eaa6dc0116de436b (diff)
downloadCMake-3cd64287fefd536561c155a0fbb1f549ab066d0e.zip
CMake-3cd64287fefd536561c155a0fbb1f549ab066d0e.tar.gz
CMake-3cd64287fefd536561c155a0fbb1f549ab066d0e.tar.bz2
Modules: Fix CMP0159 warnings in modules when tracing
Closes: #25829
Diffstat (limited to 'Modules/FindLua51.cmake')
-rw-r--r--Modules/FindLua51.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake
index 405a7a7..2249ab1 100644
--- a/Modules/FindLua51.cmake
+++ b/Modules/FindLua51.cmake
@@ -26,6 +26,9 @@ This is because, the lua location is not standardized and may exist in
locations other than lua/
#]=======================================================================]
+cmake_policy(PUSH)
+cmake_policy(SET CMP0159 NEW) # file(STRINGS) with REGEX updates CMAKE_MATCH_<n>
+
find_path(LUA_INCLUDE_DIR lua.h
HINTS
ENV LUA_DIR
@@ -73,3 +76,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua51
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY)
+
+cmake_policy(POP)