Allow cmake UI to switch between static and dynamic.

Dependency changes between static and dynamic build caused a cmake
crash when using ccmake or cmake-gui.  This is fixed by cmake in
version 3.12.  Until then deleting the target dependency data at
project startup allows the UI to function correctly.

Also warns about cosmetic issues when using older cmakes.

Change-Id: I8bd2ade9b59e7c27652090d1b6298cb01095a965


[ROCm/ROCR-Runtime commit: 0dae86f686]
This commit is contained in:
Sean Keely
2020-06-17 15:08:28 -05:00
parent 4b93b03250
commit f3679ac0bb
2 changed files with 20 additions and 2 deletions
@@ -46,12 +46,13 @@ cmake_minimum_required ( VERSION 3.5.0 )
set (QUIT 0)
# Import target 'clang'
find_package(Clang REQUIRED HINTS ${CMAKE_INSTALL_PREFIX}/llvm PATHS /opt/rocm/llvm )
find_package(Clang REQUIRED HINTS ${CMAKE_INSTALL_PREFIX}/llvm ${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm )
# Device libs doesn't support find_package yet.
get_include_path(BITCODE_DIR "Bitcode library path" RESULT FOUND NAMES "opencl.amdgcn.bc"
HINTS "${CMAKE_INSTALL_PREFIX}/lib/bitcode" "${CMAKE_INSTALL_PREFIX}/lib/x86_64/bitcode"
PATHS "/opt/rocm/lib/bitcode" "${CMAKE_INSTALL_PREFIX}/lib/x86_64/bitcode")
"${CMAKE_PREFIX_PATH}/lib/bitcode" "${CMAKE_PREFIX_PATH}/lib/x86_64/bitcode"
PATHS "/opt/rocm/lib/bitcode" "/opt/rocm/lib/x86_64/bitcode")
if (NOT ${FOUND})
set (QUIT 1)
endif()