mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: argList improvements
- argList::envExecutable() static method.
This is identical to getEnv("FOAM_EXECUTABLE"), where the name of
the executable has typically been set from the argList construction.
Provides a singleton access to this value from locations that
do not have knowledge of the originating command args (argList).
This is a similar rationale as for the argList::envGlobalPath() static.
- additional argList::envRelativePath() static method.
- make -dry-run handling more central and easier to use by adding into
argList itself.
STYLE: drop handling of -srcDoc (v1706 option)
- replaced with -doc-source for 1712 and never used much anyhow
This commit is contained in:
@ -194,9 +194,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
// Run controls
|
||||
argList::addBoolOption
|
||||
argList::addDryRunOption
|
||||
(
|
||||
"dry-run",
|
||||
"Test movement without a mesh"
|
||||
);
|
||||
argList::addBoolOption
|
||||
@ -232,7 +231,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Control parameters
|
||||
const bool dryrun = args.found("dry-run");
|
||||
const bool dryrun = args.dryRun();
|
||||
const bool slave = args.found("slave");
|
||||
const bool removeLock = args.found("removeLock");
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -246,9 +246,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
// Run controls
|
||||
argList::addBoolOption
|
||||
argList::addDryRunOption
|
||||
(
|
||||
"dry-run",
|
||||
"Test movement without a mesh"
|
||||
);
|
||||
argList::addBoolOption
|
||||
@ -273,7 +272,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Control parameters
|
||||
const bool dryrun = args.found("dry-run");
|
||||
const bool dryrun = args.dryRun();
|
||||
const bool slave = args.found("slave");
|
||||
const bool removeLock = args.found("removeLock");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user