mirror of https://github.com/KLayout/klayout.git
Adding option to load ccache in qmake command (build.sh)
This commit is contained in:
parent
a40b0cb793
commit
7cecc4507f
12
build.sh
12
build.sh
|
|
@ -231,6 +231,10 @@ while [ "$*" != "" ]; do
|
||||||
echo " -libcurl Use libcurl instead of QtNetwork (for Qt<4.7)"
|
echo " -libcurl Use libcurl instead of QtNetwork (for Qt<4.7)"
|
||||||
echo " -libexpat Use libexpat instead of QtXml"
|
echo " -libexpat Use libexpat instead of QtXml"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Environment Variables:"
|
||||||
|
echo ""
|
||||||
|
echo " QMAKE_CCACHE=1 Adds CONFIG+=ccache to qmake command (only works if Qt>=5.9.2)"
|
||||||
|
echo ""
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -609,6 +613,14 @@ qmake_options=(
|
||||||
KLAYOUT_VERSION_REV="$KLAYOUT_VERSION_REV"
|
KLAYOUT_VERSION_REV="$KLAYOUT_VERSION_REV"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This should speed up build time considerably
|
||||||
|
# https://ortogonal.github.io/ccache-and-qmake-qtcreator/
|
||||||
|
if [ $QMAKE_CCACHE = 1 ]; then
|
||||||
|
qmake_options+=(
|
||||||
|
CONFIG+="ccache"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $BUILD_EXPERT = 1 ]; then
|
if [ $BUILD_EXPERT = 1 ]; then
|
||||||
qmake_options+=(
|
qmake_options+=(
|
||||||
QMAKE_AR="$AR cqs"
|
QMAKE_AR="$AR cqs"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ touch build.txt
|
||||||
# Configure ccache
|
# Configure ccache
|
||||||
mkdir -p ccache;
|
mkdir -p ccache;
|
||||||
export CCACHE_DIR="`pwd`/ccache"
|
export CCACHE_DIR="`pwd`/ccache"
|
||||||
|
export QMAKE_CCACHE=1
|
||||||
|
|
||||||
# Show ccache stats
|
# Show ccache stats
|
||||||
echo "Cache stats:"
|
echo "Cache stats:"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue