[compiler-rt] Set CMP0114 policy for standalone build
authorVitaly Buka <vitalybuka@google.com>
Wed, 9 Nov 2022 06:59:03 +0000 (22:59 -0800)
committerVitaly Buka <vitalybuka@google.com>
Wed, 9 Nov 2022 07:00:47 +0000 (23:00 -0800)
Fixes sanitizer-x86_64-linux-qemu bot.

compiler-rt/cmake/Modules/AddCompilerRT.cmake

index 00bb892..2771a40 100644 (file)
@@ -2,6 +2,12 @@ include(ExternalProject)
 include(CompilerRTUtils)
 include(HandleCompilerRT)
 
+# CMP0114: ExternalProject step targets fully adopt their steps.
+# New in CMake 3.19: https://cmake.org/cmake/help/latest/policy/CMP0114.html
+if(POLICY CMP0114)
+  cmake_policy(SET CMP0114 OLD)
+endif()
+
 function(set_target_output_directories target output_dir)
   # For RUNTIME_OUTPUT_DIRECTORY variable, Multi-configuration generators
   # append a per-configuration subdirectory to the specified directory.