diff --git a/dev/build-info/README.md b/dev/build-info/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f3b6f2b06dbeb63dda13359e0305b50c35224e64 --- /dev/null +++ b/dev/build-info/README.md @@ -0,0 +1,5 @@ +# Script providing some info about a specific OGS build + +The script has to be run from an OGS build directory, i.e., where the +`CMakeCache.txt` file is. It works on Linux/Unix only. + diff --git a/dev/build-info/ogs6-build-info b/dev/build-info/ogs6-build-info new file mode 100755 index 0000000000000000000000000000000000000000..d035021e0a3d158c2401494f7d83c1726f18a4f8 --- /dev/null +++ b/dev/build-info/ogs6-build-info @@ -0,0 +1,50 @@ +#!/bin/sh + +if [ ! -f "CMakeCache.txt" ]; then + echo "Error: you are not in a build directory. Aborting." >&2 + exit 1 +fi + +echo "== info from CMakeCache.txt ==" +(grep -E -f - CMakeCache.txt | sort ) <<EOF +^CMAKE_BUILD_TYPE: +^CMAKE_CXX_COMPILER: +^OGS_EIGEN_DYNAMIC_SHAPE_MATRICES: +^OGS_CPU_ARCHITECTURE: +^(OGS|CMAKE)[^:]*_CXX_FLAGS[^-:]*: +^[^:]*EIGEN[^-:]*: +^FIND_PACKAGE_MESSAGE_DETAILS_Eigen3: +EOF + +echo +echo "== ogs info ==" + +if [ -x bin/ogs ]; then + cat <<"EOF" +$ bin/ogs --version +EOF + bin/ogs --version +else + echo "WARNING: bin/ogs is not executable or does not exist." +fi + +echo "== compiler info ==" +compiler="`sed -ne 's/^CMAKE_CXX_COMPILER:STRING=\(.*\)$/\1/p' CMakeCache.txt`" +arch="`sed -ne 's/^OGS_CPU_ARCHITECTURE:STRING=\(.*\)$/\1/p' CMakeCache.txt`" + +cat <<EOF +$ LANG=C "$compiler" "-march=$arch" -E -v - </dev/null 2>&1 +EOF +LANG=C "$compiler" "-march=$arch" -E -v - </dev/null 2>&1 + +echo +echo "== last ten git commits ==" + +srcdir="`sed -ne 's/^CMAKE_HOME_DIRECTORY:INTERNAL=\(.*\)$/\1/p' CMakeCache.txt`" +cat <<"EOF" +$ git -C "$srcdir" log --oneline --decorate -n 10 +EOF +git -C "$srcdir" log --oneline --decorate -n 10 + + +