Skip to content

Commit

Permalink
use ccache, update qcustomplot cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Apr 12, 2024
1 parent 86e72ab commit 692cc0f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand Down
18 changes: 18 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DZLIB_INCLUDE_DIR=${INSTALL_PREFIX}/include \
-DZLIB_LIBRARY_RELEASE=${INSTALL_PREFIX}/lib/libz.a \
-DWITH_QT6=ON
Expand Down Expand Up @@ -143,6 +144,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBENCHMARK_ENABLE_WERROR=OFF \
-DBENCHMARK_ENABLE_TESTING=OFF
time ninja
Expand All @@ -162,6 +164,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_SHARED_LIBS=OFF \
-DCATCH_INSTALL_DOCS=OFF \
-DCATCH_INSTALL_EXTRAS=ON
Expand All @@ -182,6 +185,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_opencv_apps=OFF \
-DBUILD_opencv_calib3d=OFF \
-DBUILD_opencv_core=ON \
Expand Down Expand Up @@ -305,6 +309,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DTBB_ENABLE_IPO="$TBB_ENABLE_IPO" \
-DTBB_STRICT=OFF \
-DTBB_TEST=OFF
Expand All @@ -326,6 +331,7 @@ cmake -GNinja .. \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_PREFIX_PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DONEDPL_BACKEND="tbb"
time ninja
${SUDO_CMD} ninja install
Expand All @@ -343,6 +349,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_PREFIX_PATH="$INSTALL_PREFIX" \
-DPAGMO_BUILD_STATIC_LIBRARY=ON \
-DPAGMO_BUILD_TESTS=OFF
Expand All @@ -363,6 +370,7 @@ cmake -GNinja ../expat \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DEXPAT_BUILD_DOCS=OFF \
-DEXPAT_BUILD_EXAMPLES=OFF \
-DEXPAT_BUILD_TOOLS=OFF \
Expand All @@ -387,6 +395,7 @@ cmake -GNinja .. \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_PREFIX_PATH="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DENABLE_SPATIAL=ON \
-DWITH_CPP_NAMESPACE=ON \
-DWITH_THREADSAFE_PARSER=ON \
Expand Down Expand Up @@ -423,6 +432,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$BOOST_INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DLIBCOMBINE_SKIP_SHARED_LIBRARY=ON \
-DWITH_CPP_NAMESPACE=ON \
-DCMAKE_PREFIX_PATH="$BOOST_INSTALL_PREFIX;$BOOST_INSTALL_PREFIX/lib/cmake" \
Expand All @@ -446,6 +456,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_STANDARD=17 \
-DFMT_DOC=OFF \
-DFMT_TEST:BOOL=OFF
Expand All @@ -469,6 +480,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-Djpeg=OFF \
-Djpeg12=OFF \
-Djbig=OFF \
Expand Down Expand Up @@ -499,6 +511,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DSPDLOG_BUILD_TESTS=OFF \
-DSPDLOG_BUILD_EXAMPLE=OFF \
-DSPDLOG_FMT_EXTERNAL=ON \
Expand Down Expand Up @@ -577,6 +590,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_BENCHMARKS=OFF \
-DGMP_INCLUDE_DIR=$INSTALL_PREFIX/include \
-DGMP_LIBRARY=$INSTALL_PREFIX/lib/libgmp.a \
Expand All @@ -603,6 +617,7 @@ cmake -GNinja .. \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DVTK_GROUP_ENABLE_StandAlone=YES \
-DVTK_GROUP_ENABLE_Rendering=YES \
-DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES \
Expand Down Expand Up @@ -645,6 +660,7 @@ cmake -GNinja .. \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_PREFIX_PATH=$INSTALL_PREFIX \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DBUILD_PTSCOTCH=OFF \
-DBUILD_LIBESMUMPS=OFF \
-DUSE_LZMA=OFF \
Expand All @@ -658,6 +674,8 @@ time ninja
${SUDO_CMD} ninja install
cd ../../

ccache --show-stats

mkdir artefacts
cd artefacts
tar -zcvf sme_deps_common_${OS}.tgz $INSTALL_PREFIX/*
4 changes: 2 additions & 2 deletions qcustomplot/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cmake file for https://www.qcustomplot.com/

cmake_minimum_required(VERSION 3.13...3.25)
cmake_minimum_required(VERSION 3.16...3.29)

project(
QCustomPlot
Expand All @@ -15,7 +15,7 @@ set(CMAKE_AUTORCC ON)
add_library(qcustomplot STATIC qcustomplot.cpp)
add_library(qcustomplot::qcustomplot ALIAS qcustomplot)

set_target_properties(qcustomplot PROPERTIES CXX_STANDARD 17)
set_target_properties(qcustomplot PROPERTIES CXX_STANDARD 20)
set_target_properties(qcustomplot PROPERTIES POSITION_INDEPENDENT_CODE ON)

set(WITH_QT6
Expand Down

0 comments on commit 692cc0f

Please sign in to comment.