mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: dynamicCodeContext: preprocessing options_, localCode_
This commit is contained in:
@ -85,6 +85,14 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
|
|||||||
stringOps::inplaceExpand(libs_, dict);
|
stringOps::inplaceExpand(libs_, dict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// optional
|
||||||
|
const entry* localPtr = dict.lookupEntryPtr("localCode", false, false);
|
||||||
|
if (localPtr)
|
||||||
|
{
|
||||||
|
localCode_ = stringOps::trim(localPtr->stream());
|
||||||
|
stringOps::inplaceExpand(localCode_, dict);
|
||||||
|
}
|
||||||
|
|
||||||
// calculate SHA1 digest from include, options, localCode, code
|
// calculate SHA1 digest from include, options, localCode, code
|
||||||
OSHA1stream os;
|
OSHA1stream os;
|
||||||
os << include_ << options_ << libs_ << localCode_ << code_;
|
os << include_ << options_ << libs_ << localCode_ << code_;
|
||||||
@ -103,14 +111,18 @@ Foam::dynamicCodeContext::dynamicCodeContext(const dictionary& dict)
|
|||||||
{
|
{
|
||||||
addLineDirective(include_, includePtr->startLineNumber(), dict.name());
|
addLineDirective(include_, includePtr->startLineNumber(), dict.name());
|
||||||
}
|
}
|
||||||
if (optionsPtr)
|
|
||||||
{
|
// Do not add line directive to options_ (Make/options) since at it is a
|
||||||
addLineDirective(options_, optionsPtr->startLineNumber(), dict.name());
|
// single line at this point. Can be fixed.
|
||||||
}
|
|
||||||
if (libsPtr)
|
if (libsPtr)
|
||||||
{
|
{
|
||||||
addLineDirective(libs_, libsPtr->startLineNumber(), dict.name());
|
addLineDirective(libs_, libsPtr->startLineNumber(), dict.name());
|
||||||
}
|
}
|
||||||
|
if (localPtr)
|
||||||
|
{
|
||||||
|
addLineDirective(localCode_, localPtr->startLineNumber(), dict.name());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user