Skip to content

Commit

Permalink
Merge pull request #145 from hsdk123/patch-1
Browse files Browse the repository at this point in the history
make ccache usage optional
  • Loading branch information
d99kris committed Jul 30, 2023
2 parents 9fcf2c7 + b60faad commit bcba71a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ add_library(rapidcsv INTERFACE)
target_include_directories(rapidcsv INTERFACE src)

# Ccache
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
option(RAPIDCSV_WITH_CCACHE "Use CCache if possible" ON)
if (RAPIDCSV_WITH_CCACHE)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
endif()

# Tests
Expand Down

0 comments on commit bcba71a

Please sign in to comment.