From b9de2f2b912ebeaa3d267749f0fe583245132582 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 1 Oct 2018 15:09:26 -0400
Subject: [PATCH] P4 to Git Change 1613181 by wchau@wchau_OCL_cmake on
2018/10/01 14:34:03
SWDEV-165756 - [ROCm] Backport cmake back into perforce to resolve cmake build broken issue
- porting CMAKE changes in http://git.amd.com:8080/#/c/173995/
- add new source file names in runtime/CMakeLists.txt
-- required additional changes of CMAKE files from Konstantin to build the current OCL driver using CMAKE
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#13 edit
---
opencl/api/opencl/amdocl/CMakeLists.txt | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/opencl/api/opencl/amdocl/CMakeLists.txt b/opencl/api/opencl/amdocl/CMakeLists.txt
index ca31b8192b..91bd42f192 100644
--- a/opencl/api/opencl/amdocl/CMakeLists.txt
+++ b/opencl/api/opencl/amdocl/CMakeLists.txt
@@ -30,6 +30,12 @@ include_directories(${CMAKE_SOURCE_DIR}/compiler/lib/loaders/elf/utils/libelf)
include_directories(${CMAKE_SOURCE_DIR}/compiler/lib/loaders/elf/utils/common)
include_directories(${CMAKE_SOURCE_DIR}/compiler/tools)
+if(UNIX)
+ set(ADDITIONAL_LIBRARIES glibc_functions.cpp)
+else()
+ set(ADDITIONAL_LIBRARIES "")
+endif()
+
add_library(amdocl64 SHARED
cl_memobj.cpp
cl_program.cpp
@@ -58,6 +64,7 @@ add_library(amdocl64 SHARED
cl_p2p_amd.cpp
$
$
+ ${ADDITIONAL_LIBRARIES}
)
target_link_libraries(amdocl64 opencl_driver oclelf pthread dl ${ROCR_LIBRARIES})