aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-12-30 16:11:32 +0100
committerSven Gothel <[email protected]>2022-12-30 16:11:32 +0100
commit98a704f13d96d0bd189201de7b5139a19cb18e99 (patch)
treef9586250ab2c1f48047353b40008e69f037a988c /scripts
parent746d34adb3b1b13bca8efa27a881dc9c673b9193 (diff)
Add C++20 support, use Eclipse via cmake prepare and external make, mention clang-tidy and VSCodium and IDE integration
To pass C++17/C++20 via clang-tidy, botan is build as a static library upfront w/o detailed warnings (for now).
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build.sh1
-rwxr-xr-xscripts/eclipse-cmake-prepare.sh41
2 files changed, 42 insertions, 0 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index 2d7686c..ace72f4 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -39,6 +39,7 @@ buildit() {
mkdir -p $build_dir
cd $build_dir
# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
+ # CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$build_dir"
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DUSE_LIBUNWIND=ON ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON ..
diff --git a/scripts/eclipse-cmake-prepare.sh b/scripts/eclipse-cmake-prepare.sh
new file mode 100755
index 0000000..ed56fb4
--- /dev/null
+++ b/scripts/eclipse-cmake-prepare.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+sdir=`dirname $(readlink -f $0)`
+rootdir=`dirname $sdir`
+bname=`basename $0 .sh`
+
+. $rootdir/jaulib/scripts/setup-machine-arch.sh
+
+debug_dist_dir="Debug-dist"
+debug_build_dir="Debug"
+echo debug_dist_dir $debug_dist_dir
+echo debug_build_dir $debug_build_dir
+
+release_dist_dir="Release-dist"
+release_build_dir="Release"
+echo release_dist_dir $release_dist_dir
+echo release_build_dir $release_build_dir
+
+cd $rootdir
+rm -rf $debug_dist_dir
+mkdir -p $debug_dist_dir
+rm -rf $debug_build_dir
+mkdir -p $debug_build_dir
+cd $debug_build_dir
+# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
+# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$debug_build_dir"
+
+cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$debug_dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DUSE_LIBCURL=ON -DTEST_WITH_SUDO=ON -DDEBUG=ON ..
+
+cd $rootdir
+rm -rf $release_dist_dir
+mkdir -p $release_dist_dir
+rm -rf $release_build_dir
+mkdir -p $release_build_dir
+cd $release_build_dir
+# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
+# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy;-p;$rootdir/$release_build_dir"
+
+cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$release_dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DUSE_LIBCURL=ON -DTEST_WITH_SUDO=ON ..
+
+cd $rootdir