Skip to content

Commit 2ba7bcc

Browse files
tlrmchlsmthsumitd2
authored andcommitted
[Build/CI] Set FETCHCONTENT_BASE_DIR to one location for better caching (vllm-project#8930)
Signed-off-by: Sumit Dubey <sumit.dubey2@ibm.com>
1 parent b9d3460 commit 2ba7bcc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ share/python-wheels/
3333
.installed.cfg
3434
*.egg
3535
MANIFEST
36+
/.deps/
3637

3738
# PyInstaller
3839
# Usually these files are written by a python script from a template

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,16 @@ if(NVCC_THREADS AND VLLM_GPU_LANG STREQUAL "CUDA")
166166
list(APPEND VLLM_GPU_FLAGS "--threads=${NVCC_THREADS}")
167167
endif()
168168

169+
170+
#
171+
# Use FetchContent for C++ dependencies that are compiled as part of vLLM's build process.
172+
# Configure it to place files in vllm/.deps, in order to play nicely with sccache.
173+
#
169174
include(FetchContent)
175+
get_filename_component(PROJECT_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
176+
file(MAKE_DIRECTORY "${FETCHCONTENT_BASE_DIR}")
177+
set(FETCHCONTENT_BASE_DIR "${PROJECT_ROOT_DIR}/.deps")
178+
message(STATUS "FetchContent base directory: ${FETCHCONTENT_BASE_DIR}")
170179

171180
#
172181
# Define other extension targets

0 commit comments

Comments
 (0)