add_custom_target uninstall causes a clash with the same target in rtmidi (https://github.com/thestk/rtmidi).
"add_custom_target cannot create target "uninstall" because another target with the same name already exists. The existing target is a custom target created in source directory"
Adds new option YAML_CPP_DISABLE_UNINSTALL
fixes#1151
---------
Co-authored-by: Megamouse <studienricky89@googlemail.de>
Co-authored-by: Jesse Beder <jbeder+github@gmail.com>
* CI: test with supported C++ standards
let's test with the supported standards for better coverage.
C++23 standard was just out, but the support on the toolchain is
not quite ready yet. so let's leave it for a future change.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
* CI: drop redundant Build step
"Build Tests" is strictly a superset of "Build". in addition to
the library, the former builds the tests also. both these
steps share the same set of command line arguments. by removing
"Build" step, we don't lose anything regarding the test coverage
and information for further investigation if the build fails.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---------
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This reverts commit 6262201182.
in 62622011, we wanted address the needs to use the `string_view`
converter in C++98, but that requirement was based on wrong
preconditions. `std::string_view` was introduced in C++17, and
popular standard libraries like libstdc++ and libc++ both provide
`std::string_view` when the source is built with C++17.
furthermore 62622011 is buggy. because it uses `<version>` to tell
the feature set provided by the standard library. but `<version>`
is a part of C++20. so this defeats the purpose of the change of
62622011.
Fixes#1223
* Test(CMake) set NAME and COMMAND in add_test
* (CMake) add enable_testing()
* (CMake) move cmake_dependent_option up, before using them
* (CMake) use YAML_CPP_MAIN_PROJECT in cmake_dependent_option
* (CMake) log values regarding tests
* (CMake) always find CTest, but don't enable tests
* (CMAKE)(temp) fix logging
* (actions) set YAML_CPP_BUILD_TESTS for tests
* (actions) provide YAML_CPP_BUILD_TESTS to ctest
* (actions) set -DYAML_CPP_BUILD_TESTS at build
* (actions) don't fail false
* (actions) build tests in Test step
* (actions) run tests verbose
* (CMake) remove temp logging
* (actions) split building from running tests
* (actions) ctest Debug
* (actions) ctest Debug
* Remove enable_testing
It secures the repo against erroneous or malicious actions from external jobs you call from your workflow. It's specially important for the case they get compromised, for example.
This pull request adds two new exported variables to the CMake config:
YAML_CPP_LIBRARY_DIR - points to the directory containing the built library files
YAML_CPP_SHARED_LIBS_BUILT - boolean value, lets users know whether shared libraries were built or not
On Oracle Solaris the following statement is declared in file /usr/include/sys/regset.h:
#define SS 18 /* only stored on a privilege transition */
Because of this template type name SS is substituted by numeric literal, which results in a compilation error:
error: expected nested-name-specifier before numeric constant
Fixed by renaming template type names.
Co-authored-by: Roman Degtyar <Roman.Degtyar@veeam.com>
The option `YAML_CPP_BUILD_TESTS` currently enables or disables building of tests; but unconditionally the CMake file includes CTest; this PR makes that conditional on the option.
Also, there is no option for enabling formatting, but it does check whether it can find the `clang-format` executable; this PR adds an option (default to true) that skips even looking for the executable if disabled.
After configuring the file `yaml-cpp-config.cmake.in`, the result ends up with
empty variables. (see also the discussion in #774).
Rework this file and the call to `configure_package_config_file` according the
cmake documentation
(https://cmake.org/cmake/help/v3.22/module/CMakePackageConfigHelpers.html?highlight=configure_package_config#command:configure_package_config_file)
to overcome this issue and allow a simple `find_package` after install.
As there was some discussion about the place where to install the
`yaml-cpp-config.cmake` file, e.g. #1055, factor out the install location into
an extra variable to make it easier changing this location in the future.
Also untabify CMakeLists.txt in some places to align with the other code parts in this file.
Add copying of shared library to the output directory with a test binary.
[binary] removed using of non unsigned char as argument at
'std::isspace' function that was provokes undefined behavior.
[.github/workflows/build.yml] enabled run of test at the
'windows-latest' environment.