diff --git a/autobuild/synfigstudio-linux-build.sh b/autobuild/synfigstudio-linux-build.sh index 9b18584..33c473a 100755 --- a/autobuild/synfigstudio-linux-build.sh +++ b/autobuild/synfigstudio-linux-build.sh @@ -46,6 +46,20 @@ # - debuginfo packages RELEASE=8 + +# enable ccache for speedup +if which ccache > /dev/null; then + echo "ccache found! Enabling ccache..." + export CC="ccache $CC" + export CXX="ccache $CXX" + echo "CC=$CC" + echo "CXX=$CXX" +else + echo "ccache not found..." +fi + +MAKE_SILENT=--silent LIBTOOLFLAGS=--silent + if [ -z "$PREFIX" ]; then PREFIX=$HOME/synfig/ fi @@ -539,7 +553,7 @@ fi # export LDFLAGS='' #fi -make -j$MAKE_THREADS +make -j$MAKE_THREADS $MAKE_SILENT sed -i "s|^includedir=.*$|includedir=$SYNFIG_REPO_DIR\/synfig-core\/src|" synfig.pc make install @@ -567,7 +581,7 @@ if [[ $MODE != 'quick' ]]; then /bin/sh ./configure --prefix=${PREFIX} --includedir=${PREFIX}/include --disable-static --enable-shared --enable-jack --enable-warnings=max $DEBUG $CONFIGURE_PACKAGE_OPTIONS fi -make -j$MAKE_THREADS +make -j$MAKE_THREADS $MAKE_SILENT make install for n in AUTHORS COPYING NEWS README diff --git a/autobuild/synfigstudio-linux-cmake.sh b/autobuild/synfigstudio-linux-cmake.sh index 7bb5970..cf14709 100755 --- a/autobuild/synfigstudio-linux-cmake.sh +++ b/autobuild/synfigstudio-linux-cmake.sh @@ -1,23 +1,36 @@ #!/bin/bash +set -e + +export CC="ccache gcc" +export CXX="ccache g++" + +#BUILD_FLAGS=(-GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color") +CXX_FLAGS="-fdiagnostics-color" +BUILD_FLAGS="-GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS=\"${CXX_FLAGS}\"" +#echo ${BUILD_FLAGS} +#exit + cd .. pushd ETL -mkdir build && pushd build -cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color" +mkdir -p build && pushd build +cmake .. ${BUILD_FLAGS} cmake --build . -- all test sudo cmake --build . -- install popd # build popd # ETL + pushd synfig-core -mkdir build && pushd build -cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color" +mkdir -p build && pushd build +cmake .. ${BUILD_FLAGS} cmake --build . -- all sudo cmake --build . -- install popd # build popd # synfig-core + pushd synfig-studio -mkdir build && pushd build -cmake -GNinja .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fdiagnostics-color" +mkdir -p build && pushd build +cmake .. ${BUILD_FLAGS} cmake --build . -- all # this will take a while; alternatively, you can move/copy required images # to build/images directory and skip this step diff --git a/synfig-studio/images/CMakeLists.txt b/synfig-studio/images/CMakeLists.txt index 76cc5ca..729a257 100644 --- a/synfig-studio/images/CMakeLists.txt +++ b/synfig-studio/images/CMakeLists.txt @@ -249,7 +249,7 @@ foreach (IMAGE IN ITEMS ${IMAGES}) endif() add_custom_command( TARGET build_images POST_BUILD - COMMAND synfig ${SRC}.sif --time ${TIME}f -w ${W} -h ${H} + COMMAND synfig ${SRC}.sif --time ${TIME}f -w ${W} -h ${H} --quiet COMMAND mv ${SRC}.png ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE}.png WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${SRC}.sif