P4 to Git Change 1414821 by lmoriche@lmoriche_palamida on 2017/05/26 13:04:04

SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
	- Update from git.

Affected files ...

... //depot/stg/opencl/drivers/opencl/.gitignore#1 add
... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#10 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#5 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#1 add


[ROCm/clr commit: 595192b942]
This commit is contained in:
foreman
2017-05-26 13:12:30 -04:00
rodzic 811a3b06b2
commit 0d55a0a397
4 zmienionych plików z 24 dodań i 1 usunięć
+1
Wyświetl plik
@@ -0,0 +1 @@
build/
+10 -1
Wyświetl plik
@@ -15,6 +15,7 @@ set(CMAKE_MODULE_PATH
)
set(LLVM_INCLUDE_TESTS CACHE BOOL OFF)
set(LLVM_BUILD_TOOLS CACHE BOOL OFF)
set(LLVM_TARGETS_TO_BUILD "AMDGPU" CACHE STRING "")
set(LLVM_ENABLE_PROJECTS CACHE STRING "clang")
set(LLVM_BUILD_GLOBAL_ISEL CACHE BOOL OFF)
@@ -39,9 +40,9 @@ include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/lib/Target/AMDGPU)
add_subdirectory(compiler/driver)
set(AMDGPU_TARGET_TRIPLE "amdgcn-amd-amdhsa-opencl")
set(BUILD_HC_LIB CACHE BOOL OFF)
set(ROCM_DEVICELIB_INCLUDE_TESTS CACHE BOOL OFF)
set(AMDGCN_TARGETS_LIB_LIST "AMDGCN_LIB_TARGETS")
add_subdirectory(library/amdgcn)
add_subdirectory(compiler/lib/loaders/elf/utils/libelf)
@@ -50,4 +51,12 @@ add_subdirectory(tools/bc2h)
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.0)
add_subdirectory(api/opencl/amdocl)
#add_subdirectory(api/opencl/khronos/icd)
#add_subdirectory(tools/clinfo)
@@ -1,6 +1,8 @@
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bsymbolic -Wl,--unresolved-symbols=report-all -Wl,--version-script=${CMAKE_SOURCE_DIR}/api/opencl/amdocl/amdocl.map")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
add_definitions(-DLINUX -D__x86_64__ -D__AMD64__ -DUNIX_OS -DqLittleEndian -DOPENCL_MAJOR=2 -DOPENCL_MINOR=0 -DWITH_AQL -DWITH_ONLINE_COMPILER -DATI_OS_LINUX -DATI_ARCH_X86 -DLITTLEENDIAN_CPU -DATI_BITS_64 -DATI_COMP_GCC -DWITH_HSA_DEVICE -DWITH_TARGET_AMDGCN -DOPENCL_EXPORTS -DCL_USE_DEPRECATED_OPENCL_1_0_APIS -DCL_USE_DEPRECATED_OPENCL_1_1_APIS -DCL_USE_DEPRECATED_OPENCL_1_2_APIS -DCL_USE_DEPRECATED_OPENCL_2_0_APIS -DVEGA10_ONLY=false -DWITH_LIGHTNING_COMPILER)
include_directories(${CMAKE_SOURCE_DIR}/runtime)
@@ -0,0 +1,11 @@
set(CMAKE_CXX_FLAGS "-std=c++11")
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
include_directories(${OPENCL_INCLUDE_DIRS})
add_definitions(-DHAVE_CL2_HPP)
add_executable(clinfo clinfo.cpp)
target_link_libraries(clinfo OpenCL)