* Use VERSION on the CMake project ( jbeder#733) Specifically, printing `.nan`, `.inf`, and `-.inf`, respectively, as per the spec section 10.2.1.4. * Make sure output of NaN, Infinity and -Infinity is identical on all platforms ( jbeder#717) Invalid access via operator or as will now print the offending key, if possible. * Improve error messages on operator or as ( jbeder#656) It wouldn't have compiled anyways, since the Scanner and Directive objects inside it are incomplete types at the time of the move definitions. * Add MSVC Debugger Visualizer config for YAML::Node ( jbeder#693) Weffc++ report a false positive in "include/yaml-cpp/node/impl.h". * Don't change any tests except regex_test (as a result of the change * Let default ctor delegate to the converting ctor in * Initialize all members in all classes in ctors. * Convert boolean RegEx operators to binary operators. * An exception to the above: Add default copy & move constructors &Īssignment operators for the Binary class. * Delete implicit copy & move constructors & assignment operators * Add compilation flags: -Wshadow -Weffc++ -pedantic -pedantic-errors * Apply formatting/style tweaks to comply with compile time diagnostics for g++ and clang++ ( jbeder#686) * Add optional OnAnchor method to EventHandler ( jbeder#530) NDK now uses ninja for building but yaml-cpp would emit the “ninja: error: build.ninja:326: bad $-escape (literal $ must be written as $$)” error due to syntax error in the generated build.ninja file. Splitting the condition of the if statement containing `constant expression` eliminates warnings in Visual Studio with /W4. * Fix warning C4127 on Visual Studio ( jbeder#672) * Fix GCC-types flags appended on Clang-cl ( jbeder#659) 'std::numeric_limits::max_digits10' has to be used. Representation has sufficient precision the value Using 'std::numeric_limits::digits10 + 1' is not precise enough.Ĭonverting a 'float' into a 'string' and back to a 'float' will not always This replaces all occurrences of 'std::numeric_limits::digits10 + 1' with * nextEmptyLine is always false so it is removed from the expressionĢ.01 or 3.01 can not be precisely represented with binary floating point * The second expression (ch is space) is removed because the first one contains space 0x20 * Removed an expression which is always true * Some small changes as a result of using a static analyzer ( jbeder#643) In fact, overriding them makes it impossible for users to override them themselves. Let CMake handle the default optimizations for various configurations. * Don't stomp on build flags ( jbeder#635) Option defaults to ON and setting it to OFF, disables install The contents of the file will be made available to the calling script of find_package().* Add YAML_CPP_INSTALL option for disabling install target ( jbeder#624) ( jbeder#625) We just need to provide the my_library-config.cmake file. Set(MY_LIBRARY_VERSION $ - matches this expression. Set(MY_LIBRARY_VERSION_MINOR 0 CACHE STRING "minor version" FORCE) Set(MY_LIBRARY_VERSION_MAJOR 1 CACHE STRING "major version" FORCE) # define library version (update: apparently you can also do it in project()!) The root CMakeLists.txt can look as follows: cmake_minimum_required(VERSION 3.0) This allows a seperation of CMake’s config files and other, unrelated configuration macros etc. The configurations will be set in the file which will be preprocessed to config_impl.hpp and included by config.hpp. The root CMakeLists.txt defines configuration options and adds the subdirectories. The library, the examples and the tool each has their own CMakeLists.txt defining the target and related code in their subdirectory. It also comes with some examples, a tool and unit tests. So we have a library consisting of various header and source files. The setupįor the scope of the tutorial, let’s say we have a library that has the following CMake structure: - include/ Throughout this post, I’ll be assuming a 3.x CMake version and an already existing CMake project. In particular, the system will be able to handle multiple installed versions and multiple configurations. In this post, I will show you how to install your library so that it can be used easily by other projects. As of version 0.5 my memory library now provides support for system-wide installation and CMake’s find_package().īecause I’ve spent hours of trial and error to come up with it, I’ll document it here.
0 Comments
Leave a Reply. |