15 bool const exit_on_exception)
19 "OpenGeoSys-6 software."
21 "Copyright (c) 2012-2026, OpenGeoSys Community "
22 "(https://www.opengeosys.org) "
24 "Distributed under a Modified BSD License. "
25 "See accompanying file LICENSE.txt or "
26 "https://www.opengeosys.org/project/license"
32 CMakeInfoLib::CMakeInfo::cmake_args,
35 "CMake arguments: " + CMakeInfoLib::CMakeInfo::cmake_args);
38 cmd.setOutput(&tclapOutput);
39 cmd.setExceptionHandling(exit_on_exception);
41 TCLAP::SwitchArg log_parallel(
"",
"log-parallel",
42 "enables all MPI ranks to log");
46 TCLAP::SwitchArg enable_fpe_arg(
"",
"enable-fpe",
47 "enables floating point exceptions");
49 TCLAP::SwitchArg unbuffered_cout_arg(
"",
"unbuffered-std-out",
50 "use unbuffered standard output");
52 TCLAP::ValueArg<std::string> reference_path_arg(
54 "Input. Run output result comparison after successful simulation "
55 "comparing to all files in the given path. This requires test "
56 "definitions to be present in the project file.",
57 false,
"",
"REF_PATH");
59 TCLAP::UnlabeledValueArg<std::string> project_arg(
61 "Input (.prj|.xml). Path to the ogs6 project file",
66 TCLAP::MultiArg<std::string> xml_patch_files_arg(
68 "Input (.xml). The xml patch file(s) which is (are) applied (in the "
70 "to the PROJECT_FILE",
71 false,
"XML_PATCH_FILE");
73 TCLAP::ValueArg<std::string> outdir_arg(
74 "o",
"output-directory",
"Output. The output directory to write to",
75 false,
"",
"OUTPUT_PATH");
77 TCLAP::ValueArg<std::string> mesh_dir_arg(
78 "m",
"mesh-input-directory",
79 "Input. The directory where the meshes are read from",
false,
"",
82 TCLAP::ValueArg<std::string> script_dir_arg(
83 "s",
"script-input-directory",
84 "Input. The directory where script files (e.g. Python BCs) are read "
86 false,
"",
"SCRIPT_DIR_PATH");
88 TCLAP::SwitchArg write_prj_arg(
"",
90 "Writes processed project file to output "
91 "path / [prj_base_name]_processed.prj.");
93 TCLAP::SwitchArg nonfatal_arg(
"",
94 "config-warnings-nonfatal",
95 "warnings from parsing the configuration "
96 "file will not trigger program abortion");
97 cmd.add(reference_path_arg);
99 cmd.add(xml_patch_files_arg);
101 cmd.add(mesh_dir_arg);
102 cmd.add(script_dir_arg);
103 cmd.add(write_prj_arg);
104 cmd.add(log_parallel);
106 cmd.add(log_level_arg);
107 cmd.add(nonfatal_arg);
108 cmd.add(unbuffered_cout_arg);
111 cmd.add(enable_fpe_arg);
114 cmd.parse(argc, argv);
119 cli_args.
project = project_arg.getValue();
123 cli_args.
outdir = outdir_arg.getValue();
125 mesh_dir_arg.getValue().empty() ? project_dir : mesh_dir_arg.getValue();
126 cli_args.
script_dir = script_dir_arg.getValue().empty()
128 : script_dir_arg.getValue();
129 cli_args.
nonfatal = nonfatal_arg.getValue();
131 cli_args.
log_level = log_level_arg.getValue();
132 cli_args.
write_prj = write_prj_arg.getValue();
135 if (unbuffered_cout_arg.isSet())
137 std::cout.setf(std::ios::unitbuf);