From f29300c556e541f2bf1b63ed8c6399a6c2044c8d Mon Sep 17 00:00:00 2001 From: Jan Darmochwal Date: Tue, 13 Jul 2010 17:55:06 +0200 Subject: qmake -> cmake; (mostly) cosmetic changes Switched to cmake: CMakeLists.txt in base directory use ./build.sh to build vmchooser (or mkdir -p build; cd build cmake .. && make) updated README removed fltk/ removed libxml2/ removed mesgdisp/ renamed vmchooser/ to src/ moved all header files (.h) from vmchooser/inc/ to src/ added files to repository that must have slipped the last time --- build.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 build.sh (limited to 'build.sh') diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..f1983a7 --- /dev/null +++ b/build.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# relative path to the cmake source tree directory (contains "CMakeLists.txt") +SRCDIR="." + +# relative path to the cmake build tree directory +BUILDDIR="build" + +DIR=$(pwd) + +if [[ ! -f "$DIR"/"$SRCDIR"/CMakeLists.txt ]] +then + echo "$SRCDIR/CMakeLists.txt not found" >&2 + SCRIPTNAME=$(basename "$0" 2>/dev/null || echo "$0") + echo "please run '$SCRIPTNAME' from its containing directory" >&2 + exit 1 +fi + +# note: NCORES may be too large on systems with hyperthreading +NCORES=$(grep -c "^processor" /proc/cpuinfo 2>/dev/null) +if [[ ! $NCORES -ge 1 ]] +then + NCORES=1 +fi + +mkdir -p "$BUILDDIR" +cd "$BUILDDIR" + +cmake "$DIR"/"$SRCDIR"/ && make -j $NCORES + +cd "$DIR" -- cgit v1.2.3-55-g7522