mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
backend(trtllm): relax the way to detect sccache
This commit is contained in:
parent
cb452ae7e8
commit
a434c2ffc9
@ -1,19 +1,16 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
if (NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER)
|
find_program(CCACHE_EXECUTABLE sccache)
|
||||||
find_program(CCACHE_EXECUTABLE "ccache")
|
if (NOT CCACHE_EXECUTABLE)
|
||||||
|
find_program(CCACHE_EXECUTABLE ccache)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (CCACHE_EXECUTABLE)
|
if (CCACHE_EXECUTABLE)
|
||||||
message(STATUS "Using ccache")
|
message(STATUS "Using compiler with caching: ${CCACHE_EXECUTABLE}")
|
||||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
|
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
|
||||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
|
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
|
||||||
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
|
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
|
||||||
message(STATUS "Using user specified cmake cxx compiler launcher: ${CMAKE_CXX_COMPILER_LAUNCHER}")
|
|
||||||
set(CMAKE_C_COMPILER_LAUNCHER "${CMAKE_CXX_COMPILER_LAUNCHER}")
|
|
||||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CMAKE_CXX_COMPILER_LAUNCHER}")
|
|
||||||
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CMAKE_CXX_COMPILER_LAUNCHER}")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
|
||||||
cmake_policy(SET CMP0135 NEW)
|
cmake_policy(SET CMP0135 NEW)
|
||||||
|
Loading…
Reference in New Issue
Block a user