mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: shorten paths reported in dynamicCode
This commit is contained in:
@ -51,6 +51,8 @@ const Foam::fileName Foam::dynamicCode::codeTemplateDirName
|
||||
const char* Foam::dynamicCode::libTargetRoot =
|
||||
"LIB = $(PWD)/../platforms/$(WM_OPTIONS)/lib/lib";
|
||||
|
||||
const char* Foam::dynamicCode::topDirName = "dynamicCode";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
@ -281,7 +283,7 @@ bool Foam::dynamicCode::writeDigest(const std::string& sha1) const
|
||||
|
||||
Foam::dynamicCode::dynamicCode(const word& codeName, const word& codeDirName)
|
||||
:
|
||||
codeRoot_(stringOps::expand("$FOAM_CASE/dynamicCode")),
|
||||
codeRoot_(stringOps::expand("$FOAM_CASE")/topDirName),
|
||||
libSubDir_(stringOps::expand("platforms/$WM_OPTIONS/lib")),
|
||||
codeName_(codeName),
|
||||
codeDirName_(codeDirName)
|
||||
@ -297,6 +299,18 @@ Foam::dynamicCode::dynamicCode(const word& codeName, const word& codeDirName)
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::fileName Foam::dynamicCode::codeRelPath() const
|
||||
{
|
||||
return topDirName/codeDirName_;
|
||||
}
|
||||
|
||||
|
||||
Foam::fileName Foam::dynamicCode::libRelPath() const
|
||||
{
|
||||
return codeRelPath()/libSubDir_/"lib" + codeName_ + ".so";
|
||||
}
|
||||
|
||||
|
||||
void Foam::dynamicCode::clear()
|
||||
{
|
||||
compileFiles_.clear();
|
||||
@ -376,7 +390,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
Info<< "Creating new library in " << this->libPath() << endl;
|
||||
Info<< "Creating new library in " << this->libRelPath() << endl;
|
||||
}
|
||||
|
||||
if (!allowSystemOperations)
|
||||
@ -500,7 +514,7 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
|
||||
|
||||
bool Foam::dynamicCode::wmakeLibso() const
|
||||
{
|
||||
const Foam::string wmakeCmd("wmake libso " + this->codePath());
|
||||
const Foam::string wmakeCmd("wmake libso " + this->codeRelPath());
|
||||
Info<< "Invoking " << wmakeCmd << endl;
|
||||
|
||||
if (Foam::system(wmakeCmd))
|
||||
|
||||
@ -108,6 +108,9 @@ protected:
|
||||
//- Root of the LIB target for Make/files
|
||||
static const char* libTargetRoot;
|
||||
|
||||
//- Top-level directory name for copy/compiling
|
||||
static const char* topDirName;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
@ -220,6 +223,17 @@ public:
|
||||
return codeRoot_/libSubDir_/"lib" + codeName_ + ".so";
|
||||
}
|
||||
|
||||
//- Path for specified code name relative to \$FOAM_CASE
|
||||
// Corresponds to topDirName/codeDirName()
|
||||
fileName codeRelPath() const;
|
||||
|
||||
|
||||
//- Library path for specified code name relative to \$FOAM_CASE
|
||||
// Corresponds to
|
||||
// dynamicCode/codeDirName()/libSubDir()/lib\<codeName\>.so
|
||||
fileName libRelPath() const;
|
||||
|
||||
|
||||
//- Path for SHA1Digest
|
||||
// Corresponds to codePath()/Make/SHA1Digest
|
||||
fileName digestFile() const
|
||||
|
||||
Reference in New Issue
Block a user