From 98fa1fd686764e962998d4aa6150005d18b2841c Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 5 Aug 2019 11:41:06 -0400
Subject: [PATCH] P4 to Git Change 1978446 by kzhuravl@kzhuravl-spot-ocl on
2019/08/05 11:37:30
SWDEV-79445 - OCL generic changes and code clean-up
Bring cmake changes from gerrit (reviewed and tested on gerrit)
Affected files ...
... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#28 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#7 edit
[ROCm/clr commit: d468e85281a3802bb3a2ee7215aac13345fb177c]
---
projects/clr/rocclr/CMakeLists.txt | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/projects/clr/rocclr/CMakeLists.txt b/projects/clr/rocclr/CMakeLists.txt
index 3e3868fa22..83575a39dd 100644
--- a/projects/clr/rocclr/CMakeLists.txt
+++ b/projects/clr/rocclr/CMakeLists.txt
@@ -28,14 +28,11 @@ endif()
project(OpenCL-ROCm)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/api/opencl/khronos/headers/opencl2.2" CACHE PATH "")
-# Add path for custom modules
-set(CMAKE_MODULE_PATH
- ${CMAKE_MODULE_PATH}
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
- "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
- )
+find_package(ROCT REQUIRED)
+find_package(ROCR REQUIRED)
# FIXME: Remove following if block after enabling COMGR by default
if (${USE_COMGR_LIBRARY} STREQUAL "no")
@@ -96,21 +93,14 @@ if(${USE_COMGR_LIBRARY} MATCHES "yes")
endif()
endif()
-add_subdirectory(compiler/lib/loaders/elf/utils/libelf)
-
-find_package(ROCT REQUIRED)
-find_package(ROCR REQUIRED)
-add_subdirectory(runtime)
-
-set(OPENCL_INCLUDE_DIRS
- ${CMAKE_SOURCE_DIR}/api/opencl/khronos/headers
- ${CMAKE_SOURCE_DIR}/api/opencl/khronos/headers/opencl2.2)
-
add_subdirectory(api/opencl/amdocl)
-add_subdirectory(api/opencl/khronos/icd)
-
+add_subdirectory(compiler/lib/loaders/elf/utils/libelf)
+add_subdirectory(runtime)
add_subdirectory(tools/clinfo)
+set(BUILD_SHARED_LIBS "Build shared libs" ON)
+add_subdirectory(api/opencl/khronos/icd)
+
###--- Packaging ------------------------------------------------------------###
# MAIN package