ENH: respect '-silent' option for cmake builds

- minor cleanup of wmake sources
This commit is contained in:
Mark Olesen
2017-03-15 13:06:45 +01:00
parent 4339d93c8e
commit 249f334f83
12 changed files with 456 additions and 285 deletions

View File

@ -72,6 +72,19 @@ sameDependency()
}
# CMake with output suppressed according to WM_QUIET
_cmake()
{
echo "cmake..."
if [ -n "$WM_QUIET" ]
then
cmake -DCMAKE_RULE_MESSAGES=OFF $@ >/dev/null
else
cmake $@
fi
}
# CMake into objectsDir with external dependency
# - use sentinel file(s) to handle paraview/vtk version changes
cmakeVersioned()
@ -89,7 +102,7 @@ cmakeVersioned()
mkdir -p $objectsDir && \
(
cd $objectsDir && cmake $sourceDir && make \
cd $objectsDir && _cmake $sourceDir && make \
&& echo "$depend" > ${sentinel:-/dev/null}
)
}

View File

@ -31,6 +31,7 @@
# Usage : makeFiles
#
#------------------------------------------------------------------------------
dirToString=$WM_DIR/platforms/$WM_ARCH$WM_COMPILER/dirToString
if [ -r Make/files ]
then
@ -38,10 +39,15 @@ then
exit 1
fi
dirToString=$WM_DIR/platforms/$WM_ARCH$WM_COMPILER/dirToString
[ -x "$dirToString" ] || {
echo "Error: no command $dirToString" 1>&2
exit 1
}
[ -d Make ] || mkdir Make
rm -f Make/files
#------------------------------------------------------------------------------
echo "Creating Make/files"
for dir in $(find . -mindepth 1 -type d -print)
do
@ -53,7 +59,7 @@ do
echo "$(echo $dir | $dirToString -strip) = ${dir#./}"
;;
esac
done >> Make/files
done > Make/files
[ -s Make/files ] && echo >> Make/files
for file in $(find . -name "*.[cCylLfF]" -type f -print)

View File

@ -39,11 +39,12 @@ then
fi
[ -d Make ] || mkdir Make
rm -f Make/options
#------------------------------------------------------------------------------
echo "Creating Make/options"
echo 'EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude' >> Make/options
-I$(LIB_SRC)/finiteVolume/lnInclude' > Make/options
echo >> Make/options
echo 'EXE_LIBS = \
-lfiniteVolume' >> Make/options

View File

@ -28,7 +28,7 @@
# Description
# Makes a directory hierarchy for the given target file
#
# Usage: makeTargetDir <directory>
# Usage: makeTargetDir <file>
#
#------------------------------------------------------------------------------