Include required package-config files in the release
Thanks Lars, a new release has been cut as 1.4.0-rc2.
Dear Daniel, I have created a package tclap for GNU Guix (https://issues.guix.gnu.org/75282) based on the 1.4.0-rc1 tag. But the problem is that the tag does not include this patch for bug 33. I would like to kindly ask you to create a new tag, maybe 1.4.0-rc2? That would be awesome! Thanks a lot! Lars
Fix installation of doc files
Thanks, patch tested and applied in: https://sourceforge.net/p/tclap/code/ci/81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2/
Fix installation of doc files.
Fix installation of doc files
Fix installation of doc files
Minor fixes for clang-tidy warnings
Make virtual functions calls from constructor explicit.
Add missing includes.
Minor fixes for clang-tidy warnings
Thanks
Allow const Contraints to be passed to Arg constructors
Allow const Contraints to be passed to Arg constructors
UnlabeledValueArg visitor
Fixed in [3feeb7b2499b37d9cb80890cadaf7c905a9a50c6] and [77561f5fab620e0857a04c240ae981f679449e15] respectively. Thanks for reporting.
Add missing call to check visitor in Unlabeled args.
Add missing call to check visitor in Unlabeled args.
UnlabeledValueArg visitor
Thanks for the feedback, and sorry for the delay - I was traveling. I responded to the OP on SO, but here it is for posterity: This isn't really part of the design of TCLAP. It's focused on providing "POSIX style" command line flags/arguments, which was the style of the day. It would probably not be too difficult to provide a git-style parser in the same spirit of TCLAP, but as of now TCLAP is probably to wrong tool for the job.
Also happens in version 1.2.5
Subcommands
UnlabeledValueArg visitor
string exception with short app name
Yes, it's fixed in that commit.
string exception with short app name
I believe this was fixed about a year ago in [57a98f01bc2ac69812c703df4a99f060240c7214]. Can you try fetching the latest version and see if that fixes the problem?
string exception with short app name
I think this may work in 1.4: In CmdLine.h, add a member variable (bool _optionalUnlabeled;), initialized to false in the constructor, then check in this method: inline void CmdLine::addToArgList(Arg *a) { for (ArgListIterator it = _argList.begin(); it != _argList.end(); it++) if (*a == *(*it)) throw(SpecificationException( "Argument with same flag/name already exists!", a->longID())); if (!a->hasLabel()) { if (_optionalUnlabeled) throw(SpecificationException( "You can't specify ANY Unlabeled Arg...
Done, I've cut a new 1.2.5 release that should compile with GCC 11
Cut the v1.2.5 release to fix GCC 11 build issues
Is it possible to perform a version bump in 1.2 branch so that distro packagers gets notified and package the new fixed version?
I think the challenge here is that it adds complexity for a very particular use-case, so it would have to be demonstrated that 1) this is useful for (some portion of) TCLAP's intended audience and 2) the change is simple enough to warrant adding this for everyone + the maintainers. So if you can come up with some use-cases for (1) and send a patch for (2) I'll take a look at it.
I'm not sure exactly what problem you experience, but TCLAP doesn't hold on to any of the argv's. In fact, all the parse(int argc, const char const argv) method does is to copy the argv into a temporary vector that is destroyed when the function exits. You can use CmdLine::parse(std::vector<std::string> &args) instead of messing around with argc/argv. However, do note that this vector will be modified during parsing, so you probably want to make a copy of your input before calling parse - unless...
I'm not sure exactly what problem you experience, but TCLAP doesn't hold on to any of the argv's. In fact, all the parse(int argc, const char *const *argv) method does is to copy the argv into a temporary vector that is destroyed when the function exits. inline void CmdLine::parse(int argc, const char *const *argv) { // this step is necessary so that we have easy access to // mutable strings. std::vector<std::string> args; for (int i = 0; i < argc; i++) args.push_back(argv[i]); parse(args); } Two...
Create another interface for `parse`
Still no information about what you are trying to do or why, Like I wrote above, this is for the port. The port does not need tests and examples to build unconditionally because this just wastes CPU time. Perhaps that will allow you to do what you want. I'll retest with the next release, thanks.
Still no information about what you are trying to do or why, but there were options added to disable various parts of the build in [a6429a]. Perhaps that will allow you to do what you want.
TCLAP won't build with GCC 11.1
Reported and fixed in https://sourceforge.net/p/tclap/bugs/33
Hi Daniel, Thanks for the reply. I've worked around the issue by disabling the default arguments, removing the ignore rest and replacing them using the results from the internationalisation library. The workaround is working fine so it's not a critical feature for me personally, I just thought the suggestion might be helpful.
TCLAP won't build with GCC 11.1
In the build directory ctest fails: [yuri@yv /usr/ports/devel/tclap/work/tclap-1.4.0-rc1]$ CTEST_OUTPUT_ON_FAILURE=1 ctest . Test project /usr/ports/devel/tclap/work/tclap-1.4.0-rc1 Start 1: test1 1/112 Test #1: test1 ............................***Failed 0.13 sec Traceback (most recent call last): File "/disk-samsung/freebsd-ports/devel/tclap/work/tclap-1.4.0-rc1/tests/test1.py", line 5, in <module> simple_test.test("test1", ["-r", "-n", "mike"]) File "/disk-samsung/freebsd-ports/devel/tclap/work/tclap-1.4.0-rc1/tests/simple_test.py",...
There is a port for tclap. It builds a package that users then can use. There is no need to build tests and examples in the process of building a package.
Support localization in TCLAP
We should probably do a better job of localization in general - and not simply allow changing the default args. For now, I would suggest you simply change the text in the appropriate header (as this will likely take some time to get done).
I do not know what "package build" means, please elaborate on what you are trying to do. Steps taken, expected result, and actual result. To use TCLAP you don't need to build anything, you can just include the headers.
Tests fail: No such file or directory: '../examples/test22, etc
Please run ctest from the build directory.
Tests fail: No such file or directory: '../examples/test22, etc
Please add configuration flag to disable building tests and examples
Allow replacing the descriptions of default arguments
Fixed an error in CPack packaging
Fixed an error in CPack packaging
Hello, I moved to UNICODE an old version of TCLAP, making it configurable to be ANSI or UNICODE. To do that I "simply" added a configuration file and I did a lot of find and replace, most of them automatically. To prevent conflits with the standard use of TCLAP, I renamed the namespace to TTCLAP. The configuration file contains a set of define: #if defined( TCLAP_WCHAR_T) #define _TT(x) L##x #define TTCLAP TWCLAP #define TTCHAR wchar_t #define STD_STRING std::wstring #define STD_COUT std::wcout #define...
See also https://sourceforge.net/p/tclap/bugs/25/ for related issues with static variables. Fixing this in a backwards compatible way may be a bit tricky (because the Arg doesn't necessarily have access to the CmdLine object when it is created), and given that it's a pretty rare use-case (multiple CmdLine objects + Unlabeled arguments) I'm not convinced it's worth it. It should be fixed for 2.0 though. However, non-breaking patches would be welcomed.
See also https://sourceforge.net/p/tclap/bugs/25/ for related issues with static variables. Fixing this in a backwards compatible way may be a bit tricky, and given that it's a pretty rare use-case (multiple CmdLine objects + Unlabeled arguments) I'm not convinced it's worth it. It should be fixed for 2.0 though. However, non-breaking patches would be welcomed.
Design around OptionalUnlabeledTracker is incorrect
Multiple optional positional arguments may make sense. I.e. <tool name> <backend type 1> <backend type 2>, and when a backend is not specified, use the default one. The easiest way to resolve ambiguity is to assumme that the args that have been supplied occupy the arguments going earlier.
Oh, you are right. I am using the github mirror, and I was on the master branch which is not up to date. The 1.4 branch is.
This was http://sourceforge.net/p/tclap/bugs/33, and should be fixed in [b8e464] for 1.4 and [52a118] for 1.2.
The private copy constructor are declared like this : ValueArg<T>(const ValueArg<T>& rhs); MultiArg<T>(const MultiArg<T>& rhs); This does not compile with GCC 11, with C++20 enabled. They should be declared like this : ValueArg(const ValueArg<T>& rhs); MultiArg(const MultiArg<T>& rhs);
Thanks!
CMake improvements, mainly the ones implementing packaging
CMake improvements, mainly the ones implementing packaging
tclap does not compile with g++ 11
Fixed in [b8e464] for 1.4, and [52a118] for 1.2.
Remove confusing statement about not supplying flag argument.
Fix compilation issue with C++20 and gcc-11.1
Fix compilation issue with C++20 and gcc-11.1
tclap does not compile with g++ 11
tclap does not compile with g++ 11
Replaced simple_test.sh with a C++ wrapper.
Fix issues with TmpFile stream.
Clean up tmpfiles using RAII.
Run clang-format (no code changes).
Switch to use TCLAP for arg parsing as it makes the code more readable.
Change to UNIX line endings.
Include what you use and put system headers last.
Clean up return branches, no need to keep a result variable.
Replaced simple_test.sh with a C++ wrapper.
Meson is an emerging alternative to CMake, which comes with an easy-to-use dependency management. I am currently providing patches that connect TCLAP to the Meson package ecosystem. These are called "wrap files", which are basically references to the TCLAP source packages. If someone's project depends on TCLAP, then he can simply put that wrapfile into a special subfolder. Meson will then look for an installed version of TCLAP, and, if not found, download and build it. Along with the wrap file mentioned...
Fix automake issue on mac.
Fix some (harmless) warnings from Visual Studio.
clang-format on unittest files. No functional change.
Added docs to install targets.
Explicitly initiailze member variables in init-list.
Include generated docs in release tarball.
Remove instructions to use cmake --install . --prefix=..., it appears flaky.
Script for creating a release.