STYLE: use foamVersion::api instead of OPENFOAM define

- for referencing the etc locations, or reporting the current API
  value.
This commit is contained in:
Mark Olesen
2018-12-12 03:02:49 +01:00
parent 99b85e3b3d
commit d29388f1c5
3 changed files with 5 additions and 7 deletions

View File

@ -31,6 +31,7 @@ License
#include "OSspecific.H"
#include "etcFiles.H"
#include "dictionary.H"
#include "foamVersion.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -81,7 +82,7 @@ void Foam::dynamicCode::checkSecurity
<< " allowSystemOperations 1" << nl << nl
<< "to the InfoSwitches setting in the system controlDict." << nl
<< "The system controlDict is any of" << nl << nl
<< " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl
<< " ~/.OpenFOAM/" << foamVersion::api << "/controlDict" << nl
<< " ~/.OpenFOAM/controlDict" << nl
<< " $WM_PROJECT_DIR/etc/controlDict" << nl << endl
<< exit(FatalIOError);

View File

@ -1539,11 +1539,7 @@ void Foam::argList::displayDoc(bool source) const
CStringList command(stringOps::splitSpace(docBrowser));
Info
<< "OpenFOAM"
#if OPENFOAM
<< ' ' << OPENFOAM
#endif
<< " documentation:" << nl
<< "OpenFOAM " << foamVersion::api << " documentation:" << nl
<< " " << command << nl << endl;
Foam::system(command, true);

View File

@ -26,6 +26,7 @@ License
#include "systemCall.H"
#include "Time.H"
#include "dynamicCode.H"
#include "foamVersion.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -127,7 +128,7 @@ bool Foam::functionObjects::systemCall::read(const dictionary& dict)
<< " allowSystemOperations 1" << nl << nl
<< "to the InfoSwitches setting in the system controlDict." << nl
<< "The system controlDict is any of" << nl << nl
<< " ~/.OpenFOAM/" << OPENFOAM << "/controlDict" << nl
<< " ~/.OpenFOAM/" << foamVersion::api << "/controlDict" << nl
<< " ~/.OpenFOAM/controlDict" << nl
<< " $WM_PROJECT_DIR/etc/controlDict" << nl << endl
<< exit(FatalError);