mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
This patch add new environment variables to control compiler cache. Works as follow: If persistent cache is set driver check if NEO_CACHE_DIR is set. If not then driver checks XDG_CACHE_HOME - If exists then driver create neo_compiler_cache folder, if not then driver checks HOME directory. If each NEO_CACHE_DIR, XDG_CACHE_HOME and HOME are not set then compiler cache is disabled. Current support is for Linux only. Signed-off-by: Diedrich, Kamil <kamil.diedrich@intel.com> Related-To: NEO-4262
44 lines
1.6 KiB
CMake
44 lines
1.6 KiB
CMake
#
|
|
# Copyright (C) 2019-2023 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
#
|
|
|
|
set(NEO_CORE_COMPILER_INTERFACE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_cache.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_cache.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_interface.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_interface.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_interface.inl
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_options.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_options.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/compiler_warnings/compiler_warnings.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/create_main.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/default_cache_config.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/external_functions.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/external_functions.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/igc_platform_helper.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/igc_platform_helper.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/intermediate_representations.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/linker.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/linker.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/os_compiler_cache_helper.h
|
|
${CMAKE_CURRENT_SOURCE_DIR}/tokenized_string.h
|
|
)
|
|
|
|
if(WIN32)
|
|
list(APPEND NEO_CORE_COMPILER_INTERFACE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/windows/compiler_cache_windows.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/windows/os_compiler_cache_helper.cpp
|
|
)
|
|
else()
|
|
list(APPEND NEO_CORE_COMPILER_INTERFACE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/linux/compiler_cache_linux.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/linux/os_compiler_cache_helper.cpp
|
|
)
|
|
endif()
|
|
|
|
set_property(GLOBAL PROPERTY NEO_CORE_COMPILER_INTERFACE ${NEO_CORE_COMPILER_INTERFACE})
|
|
add_subdirectories()
|