diff --git a/opencl/CMakeLists.txt b/opencl/CMakeLists.txt index e7fcf17fa0..4ddbccb8af 100644 --- a/opencl/CMakeLists.txt +++ b/opencl/CMakeLists.txt @@ -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) diff --git a/opencl/README.md b/opencl/README.md index e72dfaede7..8b4ab3d52f 100644 --- a/opencl/README.md +++ b/opencl/README.md @@ -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 diff --git a/opencl/amdocl/CMakeLists.txt b/opencl/amdocl/CMakeLists.txt index 6aabc520a9..f860fd508b 100644 --- a/opencl/amdocl/CMakeLists.txt +++ b/opencl/amdocl/CMakeLists.txt @@ -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")