Remove build hacks to support old manually set ROCclr variables
Change-Id: Iba8180b7260616a79723a1a9d2b0b206f178e735
This commit is contained in:
gecommit door
Vladislav Sytchenko
bovenliggende
a400051d3a
commit
d191ba6585
@@ -8,7 +8,7 @@ endif()
|
||||
project(opencl)
|
||||
|
||||
#example command:
|
||||
#cmake -DROCclr_DIR=/rocclr -DUSE_COMGR_LIBRARY=ON -DLIBROCclr_STATIC_DIR=/build ..
|
||||
# cmake -DCMAKE_PREFIX_PATH=/path/to/ROCclr/build/or/install ..
|
||||
|
||||
set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/khronos/headers/opencl2.2" CACHE PATH "")
|
||||
set(BUILD_SHARED_LIBS "Build shared libs" ON)
|
||||
@@ -42,28 +42,11 @@ if(USE_COMGR_LIBRARY)
|
||||
endif()
|
||||
|
||||
|
||||
# FIXME: ROCclr_DIR and LIBROCclr_STATIC_DIR are for compatability with
|
||||
# current build scripts. Instead they should install, or use
|
||||
# CMAKE_PREFIX_PATH
|
||||
# FIXME: Make this required and remove the legacy handling below
|
||||
set(save_rocclr_dir ${ROCclr_DIR})
|
||||
set(save_rocclr_static_dir ${LIBROCclr_STATIC_DIR})
|
||||
|
||||
find_package(ROCclr CONFIG
|
||||
find_package(ROCclr REQUIRED CONFIG
|
||||
PATHS
|
||||
${ROCclr_DIR}
|
||||
${LIBROCclr_STATIC_DIR})
|
||||
|
||||
if(NOT ROCclr_FOUND)
|
||||
# FIXME: Make ROCclr find required and remove this.
|
||||
#
|
||||
# This is to break the dependency on patch to start producing find
|
||||
# module.
|
||||
set(LIBROCclr_STATIC_DIR ${save_rocclr_static_dir} CACHE PATH "" FORCE)
|
||||
set(ROCclr_DIR ${save_rocclr_dir} CACHE PATH "" FORCE)
|
||||
include(${LIBROCclr_STATIC_DIR}/amdrocclr_staticTargets.cmake)
|
||||
endif()
|
||||
|
||||
add_subdirectory(khronos/icd)
|
||||
add_subdirectory(amdocl)
|
||||
add_subdirectory(tools/clinfo)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# ROCm OpenCL™ Runtime
|
||||
# ROCm OpenCL™ Runtime
|
||||
|
||||
Please build/install ROCclr first.
|
||||
|
||||
@@ -11,7 +11,7 @@ cd $OPENCL_DIR
|
||||
|
||||
mkdir -p build; cd build
|
||||
|
||||
cmake -DVDI_DIR="$VDI_DIR" -DLIBVDI_STATIC_DIR="$VDI_DIR/build" ..
|
||||
cmake -DCMAKE_PREFIX_PATH=/path/to/rocclr/build/or/install ..
|
||||
|
||||
make
|
||||
|
||||
|
||||
@@ -26,14 +26,6 @@ include_directories(${CMAKE_SOURCE_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/khronos)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/khronos/headers)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/khronos/headers/opencl2.2)
|
||||
include_directories(${ROCclr_DIR})
|
||||
include_directories(${ROCclr_DIR}/include)
|
||||
include_directories(${ROCclr_DIR}/compiler/lib)
|
||||
include_directories(${ROCclr_DIR}/compiler/lib/include)
|
||||
include_directories(${ROCclr_DIR}/compiler/lib/backends/common)
|
||||
|
||||
include_directories(${ROCclr_DIR}/elf/utils/libelf)
|
||||
include_directories(${ROCclr_DIR}/elf/utils/common)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options("-Wno-ignored-attributes")
|
||||
|
||||
Verwijs in nieuw issue
Block a user