<commit_before>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)

# Add path for custom modules
set(CMAKE_MODULE_PATH
  ${CMAKE_MODULE_PATH}
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
  )

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)
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)

add_subdirectory(compiler/driver)

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)

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)
<commit_msg>P4 to Git Change 1419430 by lmoriche@lmoriche_palamida on 2017/06/07 12:28:09<commit_after>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)

# Add path for custom modules
set(CMAKE_MODULE_PATH
  ${CMAKE_MODULE_PATH}
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
  )

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)
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)

add_subdirectory(compiler/driver)

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)

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)

{'fraction_non_alphanumeric': 0.10033617791569692, 'fraction_numerical': 0.014481510214636669, 'mean_word_length': 8.298076923076923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1622505', 'n_tokens_mistral': 1597, 'n_tokens_neox': 1510, 'n_words': 223}