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
[ROCm/clr commit: a2a8dad980]
This commit is contained in:
committed by
Maneesh Gupta
parent
cc0b04cc60
commit
d6811208f4
@@ -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})
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user