23 bool const exit_on_exception)
27 "OpenGeoSys-6 software."
29 "Copyright (c) 2012-2025, OpenGeoSys Community "
30 "(https://www.opengeosys.org) "
32 "Distributed under a Modified BSD License. "
33 "See accompanying file LICENSE.txt or "
34 "https://www.opengeosys.org/project/license"
40 CMakeInfoLib::CMakeInfo::cmake_args,
43 "CMake arguments: " + CMakeInfoLib::CMakeInfo::cmake_args);
45 cmd.setExceptionHandling(exit_on_exception);
47 TCLAP::ValueArg<std::string> log_level_arg(
49 "the verbosity of logging messages: none, error, warn, info, "
60 TCLAP::SwitchArg log_parallel(
"",
"log-parallel",
61 "enables all MPI ranks to log");
65 TCLAP::SwitchArg enable_fpe_arg(
"",
"enable-fpe",
66 "enables floating point exceptions");
68 TCLAP::SwitchArg unbuffered_cout_arg(
"",
"unbuffered-std-out",
69 "use unbuffered standard output");
71 TCLAP::ValueArg<std::string> reference_path_arg(
73 "Run output result comparison after successful simulation "
74 "comparing to all files in the given path. This requires test "
75 "definitions to be present in the project file.",
78 TCLAP::UnlabeledValueArg<std::string> project_arg(
80 "Path to the ogs6 project file.",
85 TCLAP::MultiArg<std::string> xml_patch_files_arg(
87 "the xml patch file(s) which is (are) applied (in the given order) "
88 "to the PROJECT_FILE",
91 TCLAP::ValueArg<std::string> outdir_arg(
"o",
"output-directory",
92 "the output directory to write to",
95 TCLAP::ValueArg<std::string> mesh_dir_arg(
96 "m",
"mesh-input-directory",
97 "the directory where the meshes are read from",
false,
"",
"PATH");
99 TCLAP::ValueArg<std::string> script_dir_arg(
100 "s",
"script-input-directory",
101 "the directory where script files (e.g. Python BCs) are read from",
104 TCLAP::SwitchArg write_prj_arg(
"",
106 "Writes processed project file to output "
107 "path / [prj_base_name]_processed.prj.");
109 TCLAP::SwitchArg nonfatal_arg(
"",
110 "config-warnings-nonfatal",
111 "warnings from parsing the configuration "
112 "file will not trigger program abortion");
113 cmd.add(reference_path_arg);
114 cmd.add(project_arg);
115 cmd.add(xml_patch_files_arg);
117 cmd.add(mesh_dir_arg);
118 cmd.add(script_dir_arg);
119 cmd.add(write_prj_arg);
120 cmd.add(log_level_arg);
121 cmd.add(log_parallel);
122 cmd.add(nonfatal_arg);
123 cmd.add(unbuffered_cout_arg);
126 cmd.add(enable_fpe_arg);
129 cmd.parse(argc, argv);
134 cli_args.
project = project_arg.getValue();
139 cli_args.
outdir = outdir_arg.getValue();
140 cli_args.
mesh_dir = mesh_dir_arg.getValue().empty()
142 : mesh_dir_arg.getValue();
143 cli_args.
script_dir = script_dir_arg.getValue().empty()
145 : script_dir_arg.getValue();
146 cli_args.
nonfatal = nonfatal_arg.getValue();
147 cli_args.
log_level = log_level_arg.getValue();
149 cli_args.
write_prj = write_prj_arg.getValue();
152 if (unbuffered_cout_arg.isSet())
154 std::cout.setf(std::ios::unitbuf);