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
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
export WM_CONTINUE_ON_ERROR=true # Optional unit
|
||||||
# Optional unit: continue-on-error
|
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments # Parse arguments
|
||||||
export WM_CONTINUE_ON_ERROR=true
|
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions # The CMake functions
|
||||||
|
|
||||||
# Parse arguments for library compilation
|
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
|
|
||||||
|
|
||||||
# Source CMake functions
|
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
31
bin/foamTags
31
bin/foamTags
@ -46,21 +46,34 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for cmd in etags ctags-exuberant
|
unset etags
|
||||||
|
for cmd in ctags-exuberant etags
|
||||||
do
|
do
|
||||||
type $cmd >/dev/null 2>&1 || {
|
command -v $cmd >/dev/null 2>&1 && { etags=$cmd; break; }
|
||||||
echo "${0##*/} cannot build tag files: '$cmd' command not found"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
done
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
cd $WM_PROJECT_DIR || exit 1
|
||||||
mkdir .tags 2>/dev/null
|
mkdir .tags 2>/dev/null
|
||||||
|
|
||||||
#etagsCmd="etags --declarations -l c++ -o .tags/etags -"
|
echo "building tags..." 1>&2
|
||||||
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 \) | $etags
|
||||||
|
|
||||||
find -H $WM_PROJECT_DIR \( -name "*.[HC]" -o -name lnInclude -prune -o -name Doxygen -prune \) | $etagsCmd
|
|
||||||
|
|
||||||
#gtags -i --gtagsconf bin/tools/gtagsrc .tags
|
#gtags -i --gtagsconf bin/tools/gtagsrc .tags
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd ${0%/*} || exit 1 # Run from this directory
|
cd ${0%/*} || exit 1 # Run from this directory
|
||||||
|
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions # The CMake functions
|
||||||
# Source CMake functions
|
|
||||||
. $WM_PROJECT_DIR/wmake/scripts/cmakeFunctions
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -23,7 +21,7 @@ if [ -n "$depend" ]
|
|||||||
then
|
then
|
||||||
if [ "$targetType" != objects ]
|
if [ "$targetType" != objects ]
|
||||||
then
|
then
|
||||||
if type cmake > /dev/null 2>&1
|
if command -v cmake > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
cmakeVersioned "$depend" $PWD || {
|
cmakeVersioned "$depend" $PWD || {
|
||||||
echo
|
echo
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
# ========= |
|
# ========= |
|
||||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
# \\ / O peration |
|
# \\ / O peration |
|
||||||
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
|
# \\ / A nd | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||||
# \\/ M anipulation |
|
# \\/ M anipulation |
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# License
|
# License
|
||||||
@ -100,11 +100,9 @@ cmakeVersioned()
|
|||||||
sentinel=$(sameDependency "$depend" "$sourceDir") || \
|
sentinel=$(sameDependency "$depend" "$sourceDir") || \
|
||||||
rm -rf "$objectsDir" > /dev/null 2>&1
|
rm -rf "$objectsDir" > /dev/null 2>&1
|
||||||
|
|
||||||
mkdir -p $objectsDir && \
|
mkdir -p $objectsDir \
|
||||||
(
|
&& (cd $objectsDir && _cmake $sourceDir && make) \
|
||||||
cd $objectsDir && _cmake $sourceDir && make \
|
&& echo "$depend" >| "${sentinel:-/dev/null}"
|
||||||
&& echo "$depend" > ${sentinel:-/dev/null}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user