Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge from master #14

Merged
merged 4 commits into from
Apr 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
cmake_minimum_required( VERSION 2.8 )
project (HCC)

option(HSA_USE_AMDGPU_BACKEND "Use AMDGPU LLVM backend as compiler for HSA" OFF)



# set default installation path
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND CMAKE_INSTALL_PREFIX MATCHES "/usr/local")
set(CMAKE_INSTALL_PREFIX "/opt/hcc" CACHE PATH "Default installation path of hcc" FORCE)
if (HSA_USE_AMDGPU_BACKEND)
set(CMAKE_INSTALL_PREFIX "/opt/hcc" CACHE PATH "Default installation path of hcc" FORCE)
else (HSA_USE_AMDGPU_BACKEND)
set(CMAKE_INSTALL_PREFIX "/opt/hcc-hlc" CACHE PATH "Default installation path of hcc" FORCE)
endif()
endif ()
MESSAGE("Package installation path: ${CMAKE_INSTALL_PREFIX}")

Expand Down Expand Up @@ -261,7 +269,6 @@ endif ((HAS_OPENCL EQUAL 0) AND (HAS_HSA EQUAL 0))
#################
# Detect AMDGPU backend for native codegen
#################
option(HSA_USE_AMDGPU_BACKEND "Use AMDGPU LLVM backend as compiler for HSA" OFF)

if (HSA_USE_AMDGPU_BACKEND)
add_definitions(-DHSA_USE_AMDGPU_BACKEND)
Expand Down Expand Up @@ -504,16 +511,22 @@ if(CXXAMP_ENABLE_BOLT)
endif(CXXAMP_ENABLE_BOLT)

set(CPACK_SET_DESTDIR TRUE)
set(CPACK_INSTALL_PREFIX "/opt/hcc")
set(CPACK_PACKAGE_NAME "hcc")
set(CPACK_PACKAGE_VENDOR "MulticoreWare, Inc")
set(CPACK_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})

if (HSA_USE_AMDGPU_BACKEND)
set(CPACK_PACKAGE_NAME "hcc")
else (HSA_USE_AMDGPU_BACKEND)
set(CPACK_PACKAGE_NAME "hcc_hlc")
endif(HSA_USE_AMDGPU_BACKEND)

set(CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc")
set(CPACK_PACKAGE_VERSION ${KALMAR_VERSION_STRING})
set(CPACK_PACKAGE_VERSION_MAJOR ${KALMAR_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${KALMAR_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${KALMAR_VERSION_PATCH})
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME})
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "HCC: a Heterogeneous C++ to OpenCL/HSA compiler")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jack Chung <jack@multicorewareinc.com>")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Siu Chi Chan <siuchi.chan@amd.com>")
set(CPACK_GENERATOR "DEB;TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
set(CPACK_BINARY_DEB "ON")
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/EnsureCLANGisPresent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ macro(ensure_clang_is_present dest_dir name url)

string(COMPARE EQUAL "${url}" "." default_clang)
if(default_clang)
set(REPO https://bitbucket.org/multicoreware/hcc-clang.git)
set(REPO https://github.com/RadeonOpenCompute/hcc-clang.git)
else()
set(REPO "${url}")
endif()
Expand Down