Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is from https://git.code.sf.net/p/tclap/code commit 81b3d2a0c47895c22e9bb8c577f5ab521f76e5d2 branch 1.4 of tclap Make virtual functions calls from constructor explicit. Calling virtual functions from the ctor is safe in C++, but can be confusing. This fixes clang-tidy warnings. Fixes clan-tidy warnings (https://sourceforge.net/p/tclap/patches/18/). Allow const Constraints in constructors Constraints are only used in const-safe ways, so allow a caller to pass a const Constraint. It also allows static construction of constant constraints. Add missing call to check visitor in Unlabeled args. Fixed an error in packaging preventing proper discovery using CMake `find_package` Added packaging using CPack and discovery using pkg-config. Allowed to disable building of examples and unittests. And docs (BUILD_DOC used to have no effect, it is not the case since now.) Remove confusing statement about not supplying flag argument. This is more hurtful than helpful, flag doesn't have to be specified (our docs even have this example), but flag or name does. Fix compilation issue with C++20 and gcc-11.1 Fix some (harmless) warnings from Visual Studio. VS issues warnings for `conversion from 'size_t' to 'int', possible loss of data`. Of course since these are all short strings, it's not an issue - but better to get rid of the warnings so we don't miss anything else. Remove instructions to use cmake --install . --prefix=..., it appears flaky. It doesn't appear to work with my custom doc install targets, they still revert to using the default value of CMAKE_INSTALL_PREFIX (probably because the variable is expanded during configuration, not install phase - but that's a guess). Added docs to install targets. There appears to be no standard way to install docs with CMake, so I've setup paths for win and *NIX to the best of my ability. Include generated docs in release tarball. Also, make sure that release script doesn't have to be run from the top level tclap directory. Explicitly initiailze member variables in init-list. clang-format on unittest files. No functional change. Fixed typos. Fix compilation issue on Windows. Use ptrdiff_t (C++ type) instead of ssize_t (UNIX type). Fix a bug where help output would crash if the program name was 3 chars. https://sourceforge.net/p/tclap/patches/17/ Also added some very basic support for unit tests. We can look at pulling in some more robust unit testing framework later on, but for now keeping it simple to avoid bloat. In addition, consider only platform specific path separators. Script to copy files for release. Make a note that CMake < 3.15 needs plaform specific installer. Clarify that --prefix flag goes on the --install command. --In preparation for release of v1.4. Upload docs for 1.4 to both 1.4 and root. Run clang-format on all files in prep. for 1.4 release. Clean the news file for 1.4 release. Note current maintainer in authors file. Update ChangeLog for 1.4 release. Cleaup manual.xml for 1.4 release candidate. Update Google copyright stansa. Fix compilation error on MacOS operator>> has to be declared before inclusion of Arg.h (CmdLine.h). Update copyright notices and version info. Correct/clarify years and reorder in reverse chronological order in the manual. Added note that this manual is for v1.4 since we'll soon have two versions "live". HTML manual is now built by cmake, no need to maintain it manually. Make a note of it, and remove the checked in generated file. Add example for how to use a pair as a custom type. https://sourceforge.net/p/tclap/support-requests/2/ Update generated documentation for 1.4. Echo commands from upload script. To avoid myself getting confused when the right $USER is not set. Add documentation for ExitException. Looks like it may be useful for some users to catch this instead of having TCLAP terminate the program. Also clarify that ArgException doesn't catch *any* exception. https://sourceforge.net/p/tclap/bugs/29/ Add missing expected test output from [96fd5ea]. Add some generated file types to gitignore (and sort it). Check arguments vector is not empty before accessing first element. Some users use TCLAP to parse messages sent between long-running programs by puting arguments in a std::vector<std::string> and use CmdLine::parse to parse it. Passing an empty vector to parse results in a segmentation violation (due to the fact that we always expect to be able to pop the first element). Change the behaviour to throw a more user friendly error message. https://sourceforge.net/p/tclap/bugs/30/ Revert dd2c7b6faa13ad74bce2bfe26e5483e62186ed6c that was pushed upstream by mistake. Don't catch exceptions by value. Exceptions are polymorphic, catching by value may loose information. fix sign-conversion warnings ENH: Adding travis build enviornment for CI testing CI integration for many common platforms. - Unix based platforms included - Many common unix compilers included Allow travis building of all branches ENH: Adding my.cdash.org reporting site for testing. To generate a report of the build & testing environment. ``` mkdir -p tclap-code-build cd tclap-code-build cmake ../tclap-code make Experimental # or ninja Experimental or ... ``` Then open https://my.cdash.org/index.php?project=tclap to see the resulting report. ENH: Explicitly add LANGUAGES CXX for project. STYLE: Convert CMake-language commands to lower case Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. STYLE: Remove CMake-language block-end command arguments Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. ENH: enable_testing at top level You need to move the enable_testing() call to be before you do add_subdirectory(tests). https://stackoverflow.com/questions/30250494/ctest-not-detecting-tests Clean up handling of locally allocated objects. 1) Just keep a default StdOutput around so we don't have to track if it was set by user. 2) Generalize handling of deleting allocated objects when CmdLine is destroyed. Updated TODOs Cleanup some simple setters. Inline into the class if they are only one line and make them const whenever possible.
- Loading branch information