SWDEV-442719 - Set CMP0074 to NEW to make sure find_package works correctly

If a system has LLVM installed, `find_package` could choose that one
even if we set `HIP_LLVM_ROOT`. `LLVM_ROOT` is ignored because of this
CMake policy is set to `OLD` by default.

Change-Id: I18fa0453afe170c229e92d6ddc386b43eb0c44f6
Este cometimento está contido em:
Shilei Tian criou e Maneesh Gupta cometeu 2024-02-05 05:08:11 +00:00
1 ascendente 9a6ddae7b2
cometimento a2a8dad980
2 ficheiros modificados
+8

Não existem ficheiros que correspondam à sua pesquisa

+4
Ver ficheiro
@@ -20,6 +20,10 @@
cmake_minimum_required(VERSION 3.5.1)
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
include(GNUInstallDirs)
set(VERSION_MAJOR_AMDHIP ${HIP_VERSION_MAJOR})
+4
Ver ficheiro
@@ -27,6 +27,10 @@
cmake_minimum_required(VERSION 3.16.1)
option(BUILD_SHARED_LIBS "Build the shared library" ON)
if (POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
if(BUILD_SHARED_LIBS)