Skip to content

Commit

Permalink
Merge branch 'tclap-update' into 'master'
Browse files Browse the repository at this point in the history
Update tclap to 1.4.0

See merge request ogs/ogs!5193
  • Loading branch information
Dmitry Yu. Naumov committed Jan 6, 2025
2 parents 533967f + e5aeec9 commit b97c0b4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 209 deletions.
20 changes: 11 additions & 9 deletions Applications/Utils/GeoTools/generateGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ appendNamedPolyline(std::unique_ptr<GeoLib::Polyline> polyline,

void generateSinglePointGeometry(GeoLib::Point const& point,
std::string&& point_name,
std::string& geometry_name,
std::string&& geometry_name,
GeoLib::GEOObjects& geometry)
{
std::vector<GeoLib::Point*> points;
Expand All @@ -51,7 +51,7 @@ void generatePolylineGeometry(GeoLib::Point const& point0,
GeoLib::Point const& point1,
int const number_of_subdivisions,
std::string&& polyline_name,
std::string& geometry_name,
std::string&& geometry_name,
GeoLib::GEOObjects& geometry)
{
auto intermediate_points = GeoLib::generateEquidistantPoints(
Expand Down Expand Up @@ -106,7 +106,7 @@ int generateQuadGeometry(GeoLib::Point const& point0,
int const number_of_subdivisions_second_y,
int const number_of_subdivisions_first_z,
int const number_of_subdivisions_second_z,
std::string&& quad_name, std::string& geometry_name,
std::string&& quad_name, std::string&& geometry_name,
GeoLib::GEOObjects& geometry)
{
std::array<GeoLib::Point, 4> edge_points;
Expand Down Expand Up @@ -247,8 +247,9 @@ int main(int argc, char* argv[])
auto constexpr eps = std::numeric_limits<double>::epsilon();
if (p1[0] - p0[0] < eps && p1[1] - p0[1] < eps && p1[2] - p0[2] < eps)
{
generateSinglePointGeometry(p0, std::move(polyline_name.getValue()),
geometry_name.getValue(), geometry);
generateSinglePointGeometry(p0, std::string(polyline_name.getValue()),
std::string(geometry_name.getValue()),
geometry);
}
else if ((p1[0] - p0[0] >= eps && p1[1] - p0[1] < eps &&
p1[2] - p0[2] < eps) ||
Expand All @@ -257,9 +258,9 @@ int main(int argc, char* argv[])
(p1[0] - p0[0] < eps && p1[1] - p0[1] < eps &&
p1[2] - p0[2] >= eps))
{
generatePolylineGeometry(p0, p1, nx.getValue(),
std::move(polyline_name.getValue()),
geometry_name.getValue(), geometry);
generatePolylineGeometry(
p0, p1, nx.getValue(), std::string(polyline_name.getValue()),
std::string(geometry_name.getValue()), geometry);
}
else
{
Expand All @@ -278,7 +279,8 @@ int main(int argc, char* argv[])
p0, p1, nx.getValue(), eval(nx.getValue(), nx1.getValue()),
ny.getValue(), eval(ny.getValue(), ny1.getValue()),
nz.getValue(), eval(nz.getValue(), nz1.getValue()),
std::move(polyline_name.getValue()), geometry_name.getValue(),
std::string(polyline_name.getValue()),
std::string(geometry_name.getValue()),
geometry) == EXIT_FAILURE)
{
return EXIT_FAILURE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "BaseLib/Error.h"
#include "BaseLib/MPI.h"
#include "BaseLib/Subdivision.h"
#include "BaseLib/TCLAPCustomOutput.h"
#include "InfoLib/GitInfo.h"
#include "MathLib/Point3d.h"
#include "MeshLib/Elements/Element.h"
Expand Down Expand Up @@ -68,9 +67,6 @@ int main(int argc, char* argv[])
"(http://www.opengeosys.org)",
' ', GitInfoLib::GitInfo::ogs_version);

auto tclapOutput = std::make_unique<BaseLib::TCLAPCustomOutput>();
cmd.setOutput(tclapOutput.get());

std::vector<std::string> allowed_ele_types;
allowed_ele_types.emplace_back("line");
allowed_ele_types.emplace_back("tri");
Expand Down
191 changes: 0 additions & 191 deletions BaseLib/TCLAPCustomOutput.h

This file was deleted.

2 changes: 1 addition & 1 deletion Tests/xdmfdiff/xdmfdiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ auto parseCommandLine(int argc, char* argv[]) -> Args
cmd.add(xdmf_input_b_arg);

TCLAP::ValueArg<std::string> data_array_a_arg(
"a", "first_data_array", "First data array name for comparison", true,
"a", "first_data_array", "First data array name for comparison", false,
"", "NAME");

TCLAP::ValueArg<std::string> data_array_b_arg(
Expand Down
8 changes: 4 additions & 4 deletions scripts/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ if(GUIX_BUILD OR CONDA_BUILD)
else()
CPMFindPackage(
NAME tclap
GITHUB_REPOSITORY ufz/tclap
VERSION 1.2.4
GIT_TAG 098dd0fe07a31618f3c2a9f8727bb01c8c5d61e2
GIT_REPOSITORY https://git.code.sf.net/p/tclap/code
GIT_TAG 81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2
VERSION 1.4.0
DOWNLOAD_ONLY YES
)
if(tclap_ADDED)
Expand Down Expand Up @@ -387,7 +387,7 @@ if(NOT (GUIX_BUILD OR CONDA_BUILD))
if((OGS_BUILD_TESTING OR OGS_BUILD_UTILS))
CPMAddPackage(
NAME vtkdiff GITHUB_REPOSITORY ufz/vtkdiff
GIT_TAG 7cc474101bcee45804124df8010a2275022e2f3b
GIT_TAG 628c4694783f865d7f0ab3ba9bdd5530ce4567e9
)
if(vtkdiff_ADDED)
install(PROGRAMS $<TARGET_FILE:vtkdiff> DESTINATION bin)
Expand Down

0 comments on commit b97c0b4

Please sign in to comment.