mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add wmake -debug option
- forces c++DBUG='-DFULLDEBUG -g -O0' for the compilation, to allow localized debugging during development without file editing and while retaining the WM_COMPILE_OPTION (eg, Opt) Note that switching between 'wmake' and 'wmake -debug' will not cause existing targets to be rebuilt. As before, these are driven by the dependencies. An intermediate wclean may thus be required.
This commit is contained in:
@ -53,7 +53,7 @@ USAGE
|
||||
# Parse the arguments and options
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset fromWmake optLog optQueue
|
||||
unset fromWmake optDebug optLog optQueue
|
||||
|
||||
for arg in "$@"
|
||||
do
|
||||
@ -88,8 +88,12 @@ do
|
||||
fi
|
||||
continue # Permanently remove arg
|
||||
;;
|
||||
-debug)
|
||||
optDebug="-debug"
|
||||
continue # Permanently remove arg
|
||||
;;
|
||||
-q | -queue)
|
||||
optQueue="-q"
|
||||
optQueue="-queue"
|
||||
continue # Permanently remove arg
|
||||
;;
|
||||
lib | libo | libso | dep | objects)
|
||||
@ -116,7 +120,7 @@ then
|
||||
else
|
||||
echo "Logging wmake -all output to '$optLog'" 1>&2
|
||||
echo 1>&2
|
||||
exec wmake -all $optQueue $* 2>&1 | /usr/bin/tee $optLog
|
||||
exec wmake -all $optDebug $optQueue $* 2>&1 | /usr/bin/tee $optLog
|
||||
# Need to cleanup after the tee
|
||||
rc=$? # Error code from tee (not wmake), but not entirely important
|
||||
echo "Done logging to '$optLog'" 1>&2
|
||||
@ -139,7 +143,7 @@ fi
|
||||
# Cleanup local variables and functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset fromWmake optLog optQueue
|
||||
unset fromWmake optDebug optLog optQueue
|
||||
unset -f usage
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user