1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

LP-41 - Add support for ccache

- explicitly define QMAKE_CC & CXX as "ccache <compiler>"
- use ccache for uavobjectgenerator
- Handle CCACHE setting with configuration options

To enable ccache you need to configure it like
  make CCACHE=/path/to/ccache config_append
This commit is contained in:
Alessio Morale 2015-07-17 23:21:01 +02:00 committed by a*morale
parent 2422706ba4
commit e01798d1ed
4 changed files with 14 additions and 2 deletions

View File

@ -248,3 +248,9 @@ macx {
QMAKE_CXXFLAGS_WARN_ON += -Wno-gnu-static-float-init
}
}
# use ccache when available
QMAKE_CC = $$(CCACHE) $$QMAKE_CC
QMAKE_CXX = $$(CCACHE) $$QMAKE_CXX

View File

@ -8,6 +8,10 @@ QT -= gui
macx {
QMAKE_CXXFLAGS += -fpermissive
}
# use ccache when available
QMAKE_CC = $$(CCACHE) $$QMAKE_CC
QMAKE_CXX = $$(CCACHE) $$QMAKE_CXX
TARGET = uavobjgenerator
CONFIG += console
CONFIG -= app_bundle

View File

@ -21,8 +21,8 @@ ifndef TOP_LEVEL_MAKEFILE
endif
# Define toolchain component names.
CC = $(ARM_SDK_PREFIX)gcc
CXX = $(ARM_SDK_PREFIX)g++
CC = $(CCACHE) $(ARM_SDK_PREFIX)gcc
CXX = $(CCACHE) $(ARM_SDK_PREFIX)g++
AR = $(ARM_SDK_PREFIX)ar
OBJCOPY = $(ARM_SDK_PREFIX)objcopy
OBJDUMP = $(ARM_SDK_PREFIX)objdump

View File

@ -204,6 +204,8 @@ endif
# Command to extract version info data from the repository and source tree
export VERSION_INFO = $(PYTHON) $(ROOT_DIR)/make/scripts/version-info.py --path=$(ROOT_DIR)
export CCACHE
##############################
#
# Misc settings