The FAQ list is under (constant) development. If you post a question on the Issues forum (https://github.com/synesissoftware/cstring/issues) it will be used to create one.
- Q1: "How do I build cstring?"
- Q2: "Does cstring have its own unit-tests?"
- Q3: "How do I build without the C++ examples and tests?"
- Q4: "Where are the examples?"
See INSTALL.md for the recommended CMake flow (prepare_cmake.sh, then build_cmake.sh).
For a minimal library install with no external dependencies:
$ ./prepare_cmake.sh --no-cpp --disable-testing -mFor a full build including examples and tests, install STLSoft 1.11 and xTests first, then:
$ ./prepare_cmake.sh -mExecute $ ./prepare_cmake.sh --help for the full set of options.
Yes. Automated tests live under:
- ./test/unit — unit tests;
- ./test/component — component tests;
- ./test/scratch — scratch / exploratory programs (for example libver);
When testing is enabled, build them via prepare_cmake.sh / build_cmake.sh and run with run_all_unit_tests.sh (and CTest where configured). Tests require STLSoft and xTests (and may optionally recognise shwild).
Pass --no-cpp (or -C) to prepare_cmake.sh, which sets CMake
NO_CSTRING_CPP_API=ON. That omits C++ examples and remaining C++ tests.
The C unit-tests still require STLSoft and xTests unless you also
pass --disable-testing / -T.
Examples live under examples/ (c/ and cpp/), each with a short
README.md. They are built when BUILD_EXAMPLES is on (the default); omit
them with --disable-examples / -E. Run built examples via
run_all_examples.sh. See the examples table in README.md.