dynamicCode: Fixed handling of options and libs
This commit is contained in:
@ -332,7 +332,11 @@ void Foam::codedBase::updateLibrary
|
|||||||
{
|
{
|
||||||
createLibrary(dynCode, context);
|
createLibrary(dynCode, context);
|
||||||
|
|
||||||
loadLibrary(libPath, dynCode.codeName(), context.dict());
|
if (!loadLibrary(libPath, dynCode.codeName(), context.dict()))
|
||||||
|
{
|
||||||
|
FatalIOErrorInFunction(context.dict())
|
||||||
|
<< "Failed to load " << libPath << exit(FatalIOError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// retain for future reference
|
// retain for future reference
|
||||||
|
|||||||
@ -102,6 +102,23 @@ Foam::dynamicCodeContext::dynamicCodeContext
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Options
|
||||||
|
const entry* optionsPtr = dict.lookupEntryPtr("codeOptions", false, false);
|
||||||
|
if (optionsPtr)
|
||||||
|
{
|
||||||
|
options_ =
|
||||||
|
stringOps::expand(stringOps::trim(optionsPtr->stream()), dict);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Libs
|
||||||
|
const entry* libsPtr = dict.lookupEntryPtr("codeLibs", false, false);
|
||||||
|
if (libsPtr)
|
||||||
|
{
|
||||||
|
libs_ =
|
||||||
|
stringOps::expand(stringOps::trim(libsPtr->stream()), dict);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user