mirror of
https://gitee.com/openharmony/third_party_vulkan-loader
synced 2024-11-27 01:11:22 +00:00
build: Add optional ccache support to cmake
This commit is contained in:
parent
38935954d7
commit
f0e54d2655
2
BUILD.md
2
BUILD.md
@ -40,6 +40,8 @@ cd dbuild
|
||||
make
|
||||
```
|
||||
|
||||
If your build system supports ccache, you can enable that via cmake option `-DUSE_CCACHE=On`
|
||||
|
||||
If you have installed a Vulkan driver obtained from your graphics hardware vendor, the install process should
|
||||
have configured the driver so that the Vulkan loader can find and load it.
|
||||
|
||||
|
@ -15,6 +15,15 @@ string(TOLOWER ${API_NAME} API_LOWERCASE)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
option(USE_CCACHE "Use ccache" OFF)
|
||||
if (USE_CCACHE)
|
||||
find_program(CCACHE_FOUND ccache)
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||
endif(CCACHE_FOUND)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(FALLBACK_CONFIG_DIRS "/etc/xdg" CACHE STRING
|
||||
"Search path to use when XDG_CONFIG_DIRS is unset or empty or the current process is SUID/SGID. Default is freedesktop compliant.")
|
||||
|
Loading…
Reference in New Issue
Block a user