IN_LIST: Ensure policy allows if(IN_LIST) if used by a module

This commit is contained in:
Craig Scott
2018-09-12 14:50:16 +08:00
parent e549e31f79
commit 8ede35523e
4 changed files with 20 additions and 0 deletions

View File

@@ -184,6 +184,9 @@ Helper functions which are used by the above ones
#]=======================================================================]
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
function(csharp_get_filename_keys OUT)
set(${OUT} "")
foreach(f ${ARGN})
@@ -304,3 +307,5 @@ function(csharp_set_xaml_cs_properties)
endif()
endforeach()
endfunction()
cmake_policy(POP)

View File

@@ -10,6 +10,9 @@ if(CMAKE_BINARY_DIR)
message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
endif()
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
function(cpack_deb_variable_fallback OUTPUT_VAR_NAME)
set(FALLBACK_VAR_NAMES ${ARGN})
@@ -579,3 +582,5 @@ function(cpack_deb_prepare_package_vars)
endfunction()
cpack_deb_prepare_package_vars()
cmake_policy(POP)

View File

@@ -3,6 +3,9 @@
# Author: Eric Noulard with the help of Alexander Neundorf.
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
function(get_file_permissions FILE RETURN_VAR)
execute_process(COMMAND ls -l ${FILE}
OUTPUT_VARIABLE permissions_
@@ -1865,3 +1868,5 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT
endfunction()
cpack_rpm_generate_package()
cmake_policy(POP)

View File

@@ -18,6 +18,9 @@ if(CMAKE_SYSTEM_VERSION EQUAL 1)
return()
endif()
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW) # if IN_LIST
# If the user provided CMAKE_SYSROOT for us, extract information from it.
set(_ANDROID_SYSROOT_NDK "")
set(_ANDROID_SYSROOT_API "")
@@ -371,3 +374,5 @@ endif()
# Report the chosen architecture.
message(STATUS "Android: Targeting API '${CMAKE_SYSTEM_VERSION}' with architecture '${CMAKE_ANDROID_ARCH}', ABI '${CMAKE_ANDROID_ARCH_ABI}', and processor '${CMAKE_SYSTEM_PROCESSOR}'")
cmake_policy(POP)