Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
.build_cache_dir
MANIFEST

# Generated Visual Studio files
*.vcxproj
*.vcxproj.*
*.sln

cpp/.idea/
python/.eggs/
.vscode
Expand Down
2 changes: 0 additions & 2 deletions ci/appveyor-setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ if "%USE_CLCACHE%" == "true" (
@rem Use clcache for faster builds
pip install -q git+https://github.com/frerich/clcache.git
clcache -s
set CC=clcache
set CXX=clcache
set CLCACHE_SERVER=1
set CLCACHE_HARDLINK=1
powershell.exe -Command "Start-Process clcache-server"
Expand Down
13 changes: 13 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
OFF)

if (MSVC)
option(ARROW_USE_CLCACHE
"Use clcache if available"
ON)

set(BROTLI_MSVC_STATIC_LIB_SUFFIX "-static" CACHE STRING
"Brotli static lib suffix used on Windows with MSVC (default -static)")
set(SNAPPY_MSVC_STATIC_LIB_SUFFIX "_static" CACHE STRING
Expand Down Expand Up @@ -259,6 +263,15 @@ else()
set(ARROW_BOOST_HEADER_ONLY 1)
endif()

if (MSVC AND ARROW_USE_CLCACHE AND
(("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles") OR
("${CMAKE_GENERATOR}" STREQUAL "Ninja")))
find_program(CLCACHE_FOUND clcache)
if(CLCACHE_FOUND)
set(CMAKE_CXX_COMPILER ${CLCACHE_FOUND})
endif(CLCACHE_FOUND)
endif()

############################################################
# Compiler flags
############################################################
Expand Down