24 bool const exit_on_exception)
28 "OpenGeoSys-6 software."
30 "Copyright (c) 2012-2025, OpenGeoSys Community "
31 "(https://www.opengeosys.org) "
33 "Distributed under a Modified BSD License. "
34 "See accompanying file LICENSE.txt or "
35 "https://www.opengeosys.org/project/license"
41 CMakeInfoLib::CMakeInfo::cmake_args,
44 "CMake arguments: " + CMakeInfoLib::CMakeInfo::cmake_args);
47 cmd.setOutput(&tclapOutput);
48 cmd.setExceptionHandling(exit_on_exception);
50 TCLAP::SwitchArg log_parallel(
"",
"log-parallel",
51 "enables all MPI ranks to log");
55 TCLAP::SwitchArg enable_fpe_arg(
"",
"enable-fpe",
56 "enables floating point exceptions");
58 TCLAP::SwitchArg unbuffered_cout_arg(
"",
"unbuffered-std-out",
59 "use unbuffered standard output");
61 TCLAP::ValueArg<std::string> reference_path_arg(
63 "Input. Run output result comparison after successful simulation "
64 "comparing to all files in the given path. This requires test "
65 "definitions to be present in the project file.",
66 false,
"",
"REF_PATH");
68 TCLAP::UnlabeledValueArg<std::string> project_arg(
70 "Input (.prj|.xml). Path to the ogs6 project file",
75 TCLAP::MultiArg<std::string> xml_patch_files_arg(
77 "Input (.xml). The xml patch file(s) which is (are) applied (in the "
79 "to the PROJECT_FILE",
80 false,
"XML_PATCH_FILE");
82 TCLAP::ValueArg<std::string> outdir_arg(
83 "o",
"output-directory",
"Output. The output directory to write to",
84 false,
"",
"OUTPUT_PATH");
86 TCLAP::ValueArg<std::string> mesh_dir_arg(
87 "m",
"mesh-input-directory",
88 "Input. The directory where the meshes are read from",
false,
"",
91 TCLAP::ValueArg<std::string> script_dir_arg(
92 "s",
"script-input-directory",
93 "Input. The directory where script files (e.g. Python BCs) are read "
95 false,
"",
"SCRIPT_DIR_PATH");
97 TCLAP::SwitchArg write_prj_arg(
"",
99 "Writes processed project file to output "
100 "path / [prj_base_name]_processed.prj.");
102 TCLAP::SwitchArg nonfatal_arg(
"",
103 "config-warnings-nonfatal",
104 "warnings from parsing the configuration "
105 "file will not trigger program abortion");
106 cmd.add(reference_path_arg);
107 cmd.add(project_arg);
108 cmd.add(xml_patch_files_arg);
110 cmd.add(mesh_dir_arg);
111 cmd.add(script_dir_arg);
112 cmd.add(write_prj_arg);
113 cmd.add(log_parallel);
115 cmd.add(log_level_arg);
116 cmd.add(nonfatal_arg);
117 cmd.add(unbuffered_cout_arg);
120 cmd.add(enable_fpe_arg);
123 cmd.parse(argc, argv);
128 cli_args.
project = project_arg.getValue();
133 cli_args.
outdir = outdir_arg.getValue();
134 cli_args.
mesh_dir = mesh_dir_arg.getValue().empty()
136 : mesh_dir_arg.getValue();
137 cli_args.
script_dir = script_dir_arg.getValue().empty()
139 : script_dir_arg.getValue();
140 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);