22 bool const exit_on_exception)
26 "OpenGeoSys-6 software."
28 "Copyright (c) 2012-2024, OpenGeoSys Community "
29 "(https://www.opengeosys.org) "
31 "Distributed under a Modified BSD License. "
32 "See accompanying file LICENSE.txt or "
33 "https://www.opengeosys.org/project/license"
39 CMakeInfoLib::CMakeInfo::cmake_args,
42 "CMake arguments: " + CMakeInfoLib::CMakeInfo::cmake_args);
44 cmd.setExceptionHandling(exit_on_exception);
46 TCLAP::ValueArg<std::string> log_level_arg(
48 "the verbosity of logging messages: none, error, warn, info, "
61 TCLAP::SwitchArg enable_fpe_arg(
"",
"enable-fpe",
62 "enables floating point exceptions");
64 TCLAP::SwitchArg unbuffered_cout_arg(
"",
"unbuffered-std-out",
65 "use unbuffered standard output");
67 TCLAP::ValueArg<std::string> reference_path_arg(
69 "Run output result comparison after successful simulation "
70 "comparing to all files in the given path. This requires test "
71 "definitions to be present in the project file.",
74 TCLAP::UnlabeledValueArg<std::string> project_arg(
76 "Path to the ogs6 project file.",
81 TCLAP::MultiArg<std::string> xml_patch_files_arg(
83 "the xml patch file(s) which is (are) applied (in the given order) "
84 "to the PROJECT_FILE",
87 TCLAP::ValueArg<std::string> outdir_arg(
"o",
"output-directory",
88 "the output directory to write to",
91 TCLAP::ValueArg<std::string> mesh_dir_arg(
92 "m",
"mesh-input-directory",
93 "the directory where the meshes are read from",
false,
"",
"PATH");
95 TCLAP::ValueArg<std::string> script_dir_arg(
96 "s",
"script-input-directory",
97 "the directory where script files (e.g. Python BCs) are read from",
100 TCLAP::SwitchArg write_prj_arg(
"",
102 "Writes processed project file to output "
103 "path / [prj_base_name]_processed.prj.");
105 TCLAP::SwitchArg nonfatal_arg(
"",
106 "config-warnings-nonfatal",
107 "warnings from parsing the configuration "
108 "file will not trigger program abortion");
109 cmd.add(reference_path_arg);
110 cmd.add(project_arg);
111 cmd.add(xml_patch_files_arg);
113 cmd.add(mesh_dir_arg);
114 cmd.add(script_dir_arg);
115 cmd.add(write_prj_arg);
116 cmd.add(log_level_arg);
117 cmd.add(nonfatal_arg);
118 cmd.add(unbuffered_cout_arg);
121 cmd.add(enable_fpe_arg);
124 cmd.parse(argc, argv);
129 cli_args.
project = project_arg.getValue();
134 cli_args.
outdir = outdir_arg.getValue();
135 cli_args.
mesh_dir = mesh_dir_arg.getValue().empty()
137 : mesh_dir_arg.getValue();
138 cli_args.
script_dir = script_dir_arg.getValue().empty()
140 : script_dir_arg.getValue();
141 cli_args.
nonfatal = nonfatal_arg.getValue();
142 cli_args.
log_level = log_level_arg.getValue();
143 cli_args.
write_prj = write_prj_arg.getValue();
146 if (unbuffered_cout_arg.isSet())
148 std::cout.setf(std::ios::unitbuf);