Skip to content

Commit

Permalink
Merge pull request #1967 from GermanAizek/patch-1
Browse files Browse the repository at this point in the history
Speedup compilation on all platforms using ccache
  • Loading branch information
f4exb authored Feb 3, 2024
2 parents 943105d + 79cc9f0 commit c5c5b4f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
endif()
endif()

find_program(CCACHE "ccache")
if(CCACHE)
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
if(APPLE)
set(CMAKE_OBJCXX_COMPILER_LAUNCHER ${CCACHE})
endif()
set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros)
endif(CCACHE)

set(sdrangel_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}" CACHE INTERNAL "")
message(STATUS "${APPLICATION_NAME} Version: ${sdrangel_VERSION}")
add_definitions("-DSDRANGEL_LIB_VERSION=\"${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}\"")
Expand Down

0 comments on commit c5c5b4f

Please sign in to comment.