mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: better handling of versioned cmake libraries
- sentinel was not working properly when building user-space routines
This commit is contained in:
@ -1,14 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Optional unit: continue-on-error
|
||||
export WM_CONTINUE_ON_ERROR=true
|
||||
|
||||
# Parse arguments for library compilation
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
||||
|
||||
# Source CMake functions
|
||||
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions
|
||||
export WM_CONTINUE_ON_ERROR=true # Optional unit
|
||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # Parse arguments
|
||||
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions # The CMake functions
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
29
bin/foamTags
29
bin/foamTags
@ -46,21 +46,34 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for cmd in etags ctags-exuberant
|
||||
unset etags
|
||||
for cmd in ctags-exuberant etags
|
||||
do
|
||||
type $cmd >/dev/null 2>&1 || {
|
||||
echo "${0##*/} cannot build tag files: '$cmd' command not found"
|
||||
command -v $cmd >/dev/null 2>&1 && { etags=$cmd; break; }
|
||||
done
|
||||
|
||||
[ -n "$etags" ] || {
|
||||
exec 1>&2
|
||||
echo "${0##*/} cannot build tag files: no suitable command found"
|
||||
echo " No ctags-exuberant"
|
||||
echo " No etags"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
case "$etags" in
|
||||
ctags-exuberant)
|
||||
etags="$etags -e --extra=+fq --file-scope=no --c-kinds=+p -o .tags/etags -L -"
|
||||
;;
|
||||
etags)
|
||||
etags="$etags --declarations -l c++ -o .tags/etags -"
|
||||
;;
|
||||
esac
|
||||
|
||||
cd $WM_PROJECT_DIR || exit 1
|
||||
mkdir .tags 2>/dev/null
|
||||
|
||||
#etagsCmd="etags --declarations -l c++ -o .tags/etags -"
|
||||
etagsCmd="ctags-exuberant -e --extra=+fq --file-scope=no --c-kinds=+p -o .tags/etags -L -"
|
||||
|
||||
find -H $WM_PROJECT_DIR \( -name "*.[HC]" -o -name lnInclude -prune -o -name Doxygen -prune \) | $etagsCmd
|
||||
echo "building tags..." 1>&2
|
||||
find -H $WM_PROJECT_DIR \( -name "*.[HC]" -o -name lnInclude -prune -o -name Doxygen -prune \) | $etags
|
||||
|
||||
#gtags -i --gtagsconf bin/tools/gtagsrc .tags
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source CMake functions
|
||||
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions
|
||||
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions # The CMake functions
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@ -23,7 +21,7 @@ if [ -n "$depend" ]
|
||||
then
|
||||
if [ "$targetType" != objects ]
|
||||
then
|
||||
if type cmake > /dev/null 2>&1
|
||||
if command -v cmake > /dev/null 2>&1
|
||||
then
|
||||
cmakeVersioned "$depend" $PWD || {
|
||||
echo
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -100,11 +100,9 @@ cmakeVersioned()
|
||||
sentinel=$(sameDependency "$depend" "$sourceDir") || \
|
||||
rm -rf "$objectsDir" > /dev/null 2>&1
|
||||
|
||||
mkdir -p $objectsDir && \
|
||||
(
|
||||
cd $objectsDir && _cmake $sourceDir && make \
|
||||
&& echo "$depend" > ${sentinel:-/dev/null}
|
||||
)
|
||||
mkdir -p $objectsDir \
|
||||
&& (cd $objectsDir && _cmake $sourceDir && make) \
|
||||
&& echo "$depend" >| "${sentinel:-/dev/null}"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user