Skip to content

Commit

Permalink
add RAPIDCSV_WITH_CCACHE option
Browse files Browse the repository at this point in the history
  • Loading branch information
hsdk123 committed Jul 9, 2023
1 parent 9fcf2c7 commit b60faad
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 b60faad

Please sign in to comment.