Files
rocm-systems/rocclr/CMakeLists.txt
T
foreman 8e140c9485 P4 to Git Change 1402945 by lmoriche@lmoriche_palamida on 2017/04/26 16:03:39
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment

Affected files ...

... //depot/stg/opencl/drivers/opencl/CMakeLists.txt#5 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt#1 add
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#1 add
... //depot/stg/opencl/drivers/opencl/tools/bc2h/CMakeLists.txt#1 add
2017-04-26 16:10:30 -04:00

52 lines
1.6 KiB
CMake

cmake_minimum_required(VERSION 3.4.3)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
set(PROJ_VERSION VERSION 1.5.0)
endif()
project(OpenCL-ROCm)
set(LLVM_INCLUDE_TESTS CACHE BOOL OFF)
set(LLVM_TARGETS_TO_BUILD "AMDGPU" "X86" CACHE STRING "")
set(LLVM_ENABLE_PROJECTS CACHE STRING "clang")
set(LLVM_BUILD_GLOBAL_ISEL CACHE BOOL OFF)
set(CLANG_ENABLE_ARCMT CACHE BOOL OFF)
set(CLANG_ENABLE_STATIC_ANALYZER CACHE BOOL OFF)
add_subdirectory(compiler/llvm)
find_package(LLVM REQUIRED CONFIG PATHS ${CMAKE_BINARY_DIR}/compiler/llvm NO_DEFAULT_PATH)
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include(AddLLVM)
add_definitions(${LLVM_DEFINITIONS})
# TODO: add find_package(Clang) and use LLVM/Clang variables got from their config
include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/tools/clang/include)
include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/tools/clang/include)
# TODO: move AMDGPU.h header to include folder
include_directories(${CMAKE_SOURCE_DIR}/compiler/llvm/lib/Target/AMDGPU)
include_directories(${CMAKE_BINARY_DIR}/compiler/llvm/lib/Target/AMDGPU)
set(AMD_EXTENSIONS CACHE BOOL OFF)
set(BUILD_HSAILASM CACHE BOOL OFF)
add_subdirectory(compiler/sc/HSAIL/hsail-tools)
add_subdirectory(compiler/driver)
set(CMAKE_C_COMPILER "${PROJECT_BINARY_DIR}/compiler/llvm/bin/clang")
set(BUILD_HC_LIB CACHE BOOL OFF)
set(ROCM_DEVICELIB_INCLUDE_TESTS CACHE BOOL OFF)
add_subdirectory(library/amdgcn)
add_subdirectory(compiler/lib/loaders/elf/utils/libelf)
add_subdirectory(tools/bc2h)
add_dependencies(bc2h clang) # FIXME: remove
add_dependencies(oclelf clang) # FIXME: remove
add_subdirectory(runtime)
add_subdirectory(api/opencl/amdocl)