diff options
author | Sven Göthel <[email protected]> | 2024-08-09 03:25:19 +0200 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-08-09 03:25:19 +0200 |
commit | c93625e331843f58e7590a68b5a032afac52aad5 (patch) | |
tree | 600ddfd08c39abc708c9fd82dc05806877933487 /scripts/build.sh | |
parent | 922a13d510ca9ed991bc2517af647b0e6af8da1f (diff) |
Align to jaulib 1.3.4: Full cmake-presets usage w/ vscode support update; also use cmake target_{link|compile}_options instead of globalsv1.2.4
Example run scripts were also adopted.
Unit and trial tests passed on amd64 machine.
VSCode(ium) IDE integration manually tested.
Diffstat (limited to 'scripts/build.sh')
-rw-r--r-- | scripts/build.sh | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/scripts/build.sh b/scripts/build.sh deleted file mode 100644 index fb79270..0000000 --- a/scripts/build.sh +++ /dev/null @@ -1,75 +0,0 @@ -#! /bin/sh - -sdir=`dirname $(readlink -f $0)` -rootdir=`dirname $sdir` -bname=`basename $0 .sh` - -. $rootdir/jaulib/scripts/setup-machine-arch.sh - -logfile=$rootdir/$bname-$os_name-$archabi.log -rm -f $logfile - -CPU_COUNT=`getconf _NPROCESSORS_ONLN` - -# run as root 'dpkg-reconfigure locales' enable 'en_US.UTF-8' -# perhaps run as root 'update-locale LC_MEASUREMENT=en_US.UTF-8 LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8' -export LC_MEASUREMENT=en_US.UTF-8 -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 - -buildit() { - if [ -z "$JAVA_HOME" -o ! -e "$JAVA_HOME" ] ; then - echo "WARNING: JAVA_HOME $JAVA_HOME does not exist" - else - echo JAVA_HOME $JAVA_HOME - fi - echo rootdir $rootdir - echo logfile $logfile - echo CPU_COUNT $CPU_COUNT - - dist_dir="dist-$os_name-$archabi" - build_dir="build-$os_name-$archabi" - echo dist_dir $dist_dir - echo build_dir $build_dir - - cd $rootdir - rm -rf $dist_dir - mkdir -p $dist_dir - rm -rf $build_dir - 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" - CXX_ARGS="-DCMAKE_CXX_STANDARD=20" - - # cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DUSE_LIBUNWIND=ON .. - # cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON .. - - cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DUSE_LIBCURL=ON .. - # cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DUSE_LIBCURL=ON -DDEBUG=ON .. - - # cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DUSE_LIBCURL=ON -DUSE_LIBUNWIND=ON .. - # cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DDEBUG=ON .. - # cmake $CLANG_ARGS $CXX_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/$dist_dir -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DTEST_WITH_SUDO=ON -DDEBUG=ON -DINSTRUMENTATION=ON .. - - make -j $CPU_COUNT install - if [ $? -eq 0 ] ; then - echo "BUILD SUCCESS $bname $os_name $archabi" - make test - if [ $? -eq 0 ] ; then - echo "TEST SUCCESS $bname $os_name $archabi" - cd $rootdir - return 0 - else - echo "TEST FAILURE $bname $os_name $archabi" - cd $rootdir - return 1 - fi - else - echo "BUILD FAILURE $bname $os_name $archabi" - cd $rootdir - return 1 - fi -} - -buildit 2>&1 | tee $logfile |