ENH: use foamVersion::api internally in etcFiles searching (#1010)

- prefer this to using the OPENFOAM define since this improves the
  internal consistency with the build information.

  The API information could change between builds without the
  etcFiles.C being recompiled whereas the value of
  Foam::foamVersion::api is force updated during the build (triggers
  recompilation of globals.Cver)
This commit is contained in:
Mark Olesen
2018-12-08 17:42:31 +01:00
parent afc373d683
commit 5e4d7386ec
4 changed files with 84 additions and 15 deletions

View File

@ -64,6 +64,11 @@ int main(int argc, char *argv[])
"list",
"List directories or files to be checked"
);
argList::addBoolOption
(
"list-all",
"List all directories (including non-existence ones)"
);
argList::addArgument("file...");
argList::addNote
@ -77,9 +82,15 @@ int main(int argc, char *argv[])
// First handle no parameters
if (args.size() == 1)
{
if (args.found("list"))
if (args.found("list-all"))
{
fileNameList results = findEtcDirs();
fileNameList results = etcDirs(false);
printList(results);
return 0;
}
else if (args.found("list"))
{
fileNameList results = etcDirs();
printList(results);
return 0;
}