we were using a for loop for this purpose, but the for loop was unrolled
when we bumped up the required cmake version.
this change paves the road to setting "CMP0135" to "NEW". this policy
is a new one introduced by CMake v3.24.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
cmake_policy(SET CMP0074 NEW)
cmake_policy(SET CMP0075 NEW)
cmake_policy(SET CMP0093 NEW)
-if(POLICY CMP0127)
- cmake_policy(SET CMP0127 NEW)
+foreach(policy CMP0127)
+ if(POLICY ${policy})
+ cmake_policy(SET ${policy} NEW)
+ endif()
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")