Skip to content

Commit

Permalink
use ccache if available
Browse files Browse the repository at this point in the history
  • Loading branch information
yshekel committed Aug 21, 2024
1 parent 0d447c9 commit 65b99dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Empty file removed device_api.md
Empty file.
13 changes: 13 additions & 0 deletions icicle_v3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ endif()
# Print the selected build type
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

# Find the ccache program
find_program(CCACHE_PROGRAM ccache)
# If ccache is found, use it as the compiler launcher
if(CCACHE_PROGRAM)
message(STATUS "ccache found: ${CCACHE_PROGRAM}")

# Use ccache for C and C++ compilers
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM})
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM})
else()
message(STATUS "ccache not found")
endif()

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Build options
Expand Down

0 comments on commit 65b99dc

Please sign in to comment.