Allow ccache enabled builds if -DROCM_CCACHE_BUILD=ON

Change-Id: Ie3ebb5d95af5fa55f11c9c88378ab29736538e25


[ROCm/ROCR-Runtime commit: 7d8205548b]
Tá an tiomantas seo le fáil i:
Konstantin Zhuravlyov
2019-07-31 13:26:20 -04:00
tuismitheoir a11a683700
tiomantas 466099ec20
@@ -51,6 +51,17 @@ set ( CORE_RUNTIME_TARGET "${CORE_RUNTIME_NAME}64" )
set ( CORE_RUNTIME_LIBRARY "lib${CORE_RUNTIME_TARGET}" )
project( ${CORE_RUNTIME_TARGET} )
# Optionally, build HSA Runtime with ccache.
set(ROCM_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
if (ROCM_CCACHE_BUILD)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
else()
message(WARNING "Unable to find ccache. Falling back to real compiler")
endif() # if (CCACHE_PROGRAM)
endif() # if (ROCM_CCACHE_BUILD)
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
include ( utils )
include ( hsa_common )