ENH: add prescan handling of -debug-switch etc

- allows use of registered switches before startup of UPstream etc.
This commit is contained in:
Mark Olesen
2025-02-10 10:13:03 +01:00
parent 6f2fadb48f
commit 3b40dd8c29
8 changed files with 176 additions and 87 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019-2023 OpenCFD Ltd.
Copyright (C) 2019-2025 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -125,13 +125,16 @@ int main(int argc, char *argv[])
argList::addVerboseOption("Set UPstream::debug level");
// Check -verbose before initialisation
UPstream::debug = argList::verbose(argc, argv);
if (!UPstream::debug)
{
UPstream::debug = argList::verbose(argc, argv);
}
startMPI();
#include "setRootCase.H"
Pout<< message().c_str();
Pout<< message().data();
stopMPI();