Commit 1187807e authored by Vitaly Lipatov's avatar Vitaly Lipatov

add new command - ccmake

parent 485aaf2b
#!/bin/sh
# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common
if [ "$1" == "-h" ] || [ "$1" == "--help" ] ;
echo "ccmake - make with ccache using and parallel build enabled"
exit 0
fi
# TODO: use common ccache dir
export CCACHE_DIR=$OURTMPDIR/ccache
which ccache >/dev/null || fatal "Install ccache package before using"
export CC="ccache gcc"
export CPP="ccache gcc -E"
export CXX="ccache g++"
export CXXCPP="ccache g++ -E"
[ -n "$NPROCS" ] || NPROCS=`/usr/bin/getconf _NPROCESSORS_ONLN`
MAKEARG=
[ "$NPROCS" -gt 1 ] && MAKEARG="-j$NPROCS"
make $MAKEARG "CC=$CC" "CXX=$CXX" "CPP=$CPP" "CXXCPP=$CXXCPP" $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment