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
This commit is contained in:
Shilei Tian
2024-01-23 14:06:20 -05:00
committato da Maneesh Gupta
parent 9a6ddae7b2
commit a2a8dad980
2 ha cambiato i file con 8 aggiunte e 0 eliminazioni
+4
Vedi File
@@ -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
Vedi File
@@ -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)