summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2018-07-03 12:16:17 (GMT)
committerBrad King <brad.king@kitware.com>2018-07-03 15:23:22 (GMT)
commit91f4adb0284b20c23223bc0243aa96ff8bbc1941 (patch)
treeba844e81a2c00307486ad60a38dbe976ece1d2fb /Modules
parent51e7d4150756a01d51da38acfd0a469b138e1fde (diff)
downloadCMake-91f4adb0284b20c23223bc0243aa96ff8bbc1941.zip
CMake-91f4adb0284b20c23223bc0243aa96ff8bbc1941.tar.gz
CMake-91f4adb0284b20c23223bc0243aa96ff8bbc1941.tar.bz2
FindLua: Set CMP0012 to NEW for the revised search code
Code added by commit v3.12.0-rc1~53^2 (FindLua: Search for lua.h using more conventional paths, 2018-05-20) depends on `CMP0012` NEW behavior. Set the policy explicitly for the scope of the FindLua module. Fixes: #18142
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindLua.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
index 8f35fc7..b57a46e 100644
--- a/Modules/FindLua.cmake
+++ b/Modules/FindLua.cmake
@@ -36,6 +36,9 @@
# This is because, the lua location is not standardized and may exist in
# locations other than lua/
+cmake_policy(PUSH) # Policies apply to functions at definition-time
+cmake_policy(SET CMP0012 NEW) # For while(TRUE)
+
unset(_lua_include_subdirs)
unset(_lua_library_names)
unset(_lua_append_versions)
@@ -236,3 +239,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
VERSION_VAR LUA_VERSION_STRING)
mark_as_advanced(LUA_INCLUDE_DIR LUA_LIBRARY LUA_MATH_LIBRARY)
+
+cmake_policy(POP)