Commit Graph

100 Commits

Author SHA1 Message Date
Pete Lewis 8106fcf1e5 Resolve warnings about unreferenced parameter 'style' in NullEventHandlers (#1193) 2023-10-12 11:49:34 -04:00
Michał Janiszewski 1713859b05 Remove unused code from parse util (#1048) 2021-10-13 15:56:11 -05:00
Rosen Penev dbb385bdf5 [clang-tidy] use empty method (#895)
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-15 17:23:40 -05:00
Rosen Penev 66171449d4 [clang-tidy] replace typedef with using (#886)
Found with modernize-use-using

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-15 15:27:08 -05:00
Rosen Penev 33c9f6e062 [clang-tidy] use override (#885)
Found with modernize-use-override

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-15 15:20:22 -05:00
Rosen Penev 7e4f290ef9 [clang-tidy] use = default (#887)
Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-15 15:19:21 -05:00
Isabella Muerte 5e9cb0128d Refactor CMake to use more modern paradigms (#741)
Remove 2.6-isms
Remove 2.8-isms
Bump CMake minimum version to 3.4

Disable some options when used as a subdirectory

Use `CONFIGURE_DEPENDS` with `file(GLOB)` when possible

Backport CMake 3.15's MSVC_RUNTIME_LIBRARY setting.
Set all compile options as generator expressions.
Set all find-package files to be installed to the correct file.

Remove `export(PACKAGE)`, as this has been deprecated.
Remove fat binary support
Remove manual setting of iPhone settings. These should be set by parent
projects.
Remove use of ExternalProject for a local use
Conditionally remove format target unless clang-format is found
2019-09-27 09:59:53 -05:00
Andy Maloney d638508d33 Set C++ standard options in CMake per-target instead of globally (#735)
Setting CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED directly is problematic when including yaml-cpp as a subproject.

The proper way is to set these per-target.
2019-09-10 07:51:13 -07:00
Azamat H. Hackimov 5e79f5eed3 Improvements to CMake buildsystem
Roll-forward of c90c08ccc9 "Revert "Improvements to CMake buildsystem (#563)""

NEW:

* Replace CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR

Fixes #612 when yaml-cpp is used as a git submodule.

ORIGINAL:

* Move enable_testing() into proper place

* Added CMake's checks for C++11 standards

Raised minimal version of CMake to 3.1, since on old systems there no
decent compilers that supports c++11.

Closes #377.

* Externalize googletest project

Externalize gtest to avoid installation, fixes #539.

* Remove defined cmake_policies

CMP0012 - OLD marked as deprecated for >=cmake-3.1 and will be removed
CMP0015 - does not affect to build process
CMP0042 - already NEW for >=cmake-3.1

Fixes #505

* Fix compiling in Windows MSVC
2018-09-03 10:37:06 -05:00
Jesse Beder c90c08ccc9 Revert "Improvements to CMake buildsystem (#563)"
This reverts commit 3e33bb3166.

The original commit broke the build (#612) when yaml-cpp is used as a git submodule.
2018-08-09 10:05:07 -05:00
Azamat H. Hackimov 3e33bb3166 Improvements to CMake buildsystem (#563)
* Move enable_testing() into proper place

* Added CMake's checks for C++11 standards

Raised minimal version of CMake to 3.1, since on old systems there no
decent compilers that supports c++11.

Closes #377.

* Externalize googletest project

Externalize gtest to avoid installation, fixes #539.

* Remove defined cmake_policies

CMP0012 - OLD marked as deprecated for >=cmake-3.1 and will be removed
CMP0015 - does not affect to build process
CMP0042 - already NEW for >=cmake-3.1

Fixes #505

* Fix compiling in Windows MSVC
2018-08-09 07:11:50 -05:00
Jiao 4fb1c4b92b Enable items to be removed from a sequence (#582) 2018-05-14 08:50:28 -05:00
Matthew Woehlke 5a519a4c6c Fix NullEventHandler overloads
Fix some virtual methods of NullEventHandler that were apparently
intended to overload base class methods, but did not. Add override
keyword to prevent these getting out of sync again.
2017-11-10 15:17:46 -08:00
Jesse Beder 3d9ad75af7 Add <cstdlib> for std::atoi. 2016-11-21 20:22:26 -06:00
Jesse Beder 9e37409b4b Add features to read binary:
Flag -n N repeats parsing N times.
Flag -c (--cache) caches the input in a string and uses that to parse.
2016-01-30 18:28:27 -06:00
Scott Wolchok a5b72f7ae6 read benchmark: accept a filename as an argument
On my Macbook Pro, reading from standard input incurs a bunch of locking
overhead, which complicates profiling and (IMO) adds noise to
results. This adds the option to read from a file, which doesn't incur
this overhead.
2016-01-30 17:41:28 -06:00
Matt Blair 24fa1b3380 Replace Boost usage with C++11 features
- Adds 'std=c++11' compiler flags
 - Replaces boost::type_traits with std::type_traits
 - Replaces boost::shared_ptr with std::shared_ptr
 - Replaces std::auto_ptr with std::unique_ptr
 - Replaces raw pointers with std::unique_ptr in ptr_vector, ptr_stack, and SettingChanges
 - Replaces boost::noncopyable with deleted copy and assignment operators
 - Replaces boost::next with std::next
 - Replaces boost::enable_if with std::enable_if
 - Replaces boost::is_convertible with std::is_convertible
 - Replaces ptrdiff_t with std::ptrdiff_t
 - Replaces boost::iterator_facade and boost::iterator_adaptor with std::iterator, borrowing the 'proxy reference' technique from boost
 - Removes Boost dependency from CMakeLists
 - Formats changed files using clang-format
2016-01-10 22:44:15 -05:00
Jesse Beder 0970a108bd Remove stray field 2015-01-24 17:58:58 -06:00
Jesse Beder 1025f76df1 Fix memory leak when accessing a const Node with a key that doesn't exist. 2015-01-24 17:22:45 -06:00
Jesse Beder 0c280724e9 Add flow/block style setting on Nodes 2015-01-24 13:11:43 -06:00
Jesse Beder 9880b608b9 Merge from core 2015-01-24 12:26:16 -06:00
Jesse Beder ad712c4f2d Add EmitterStyle, which will allow sequence or map style (i.e., flow or block) to be preserved between parsing and emitting 2015-01-24 12:19:20 -06:00
Jesse Beder dea3428ce0 Merge from core 2014-03-25 00:07:38 -05:00
Jesse Beder e0b293e757 Add test and util sources to make format 2014-03-25 00:02:16 -05:00
Jesse Beder 599d050eb2 Merge read fix from core 2014-03-22 23:19:07 -05:00
Jesse Beder 314baa6e13 Add missing include to read.cpp 2014-03-22 23:18:27 -05:00
Jesse Beder 4b40441cee Run IWYU 2014-03-22 23:14:48 -05:00
Jesse Beder 8d7eb02c46 Merge IWYU from core 2014-03-22 23:08:09 -05:00
Jesse Beder 5fd25df859 Run IWYU 2014-03-22 22:46:04 -05:00
Jesse Beder d63ec48c8a Run clang-format 2014-03-22 13:05:03 -05:00
Jesse Beder 3355bbb399 Merge clang-format from core 2014-03-22 13:03:18 -05:00
Jesse Beder 9b4db068bb Run clang-format 2014-03-22 12:49:16 -05:00
Jesse Beder b12e4b0781 Merged from core, rfaef276b1f6e 2012-11-08 18:33:12 -06:00
Jesse Beder 979a91692f Added small 'read' program to test reading a single doc (from stdin) 2012-09-15 16:29:07 -07:00
Jesse Beder f29ea4b070 Merged end of map/seq flow fix from core 2012-06-09 14:42:00 -05:00
Jesse Beder 68dd9b5d18 Fixed bug where the parser doesn't find the end of a map or seq flow 2012-06-09 14:39:00 -05:00
Jesse Beder a78069a6e2 Merged ostreams for the emitter change from the core 2012-05-25 19:35:24 -05:00
Jesse Beder 2ffdc5b4d1 Added constructor to the Emitter with a stream, so you can write directly to a stream instead of our temp 2012-05-25 18:22:33 -05:00
Jesse Beder e6d4a915dc Switched the ostream wrapper to wrap a std::vector<char> instead of our manually managed memory 2012-05-25 18:17:14 -05:00
Jesse Beder 4116d89f2c Merged emitter refactor from core 2012-05-23 15:30:03 -05:00
Jesse Beder 0abbf650b5 Fixed char output 2012-05-22 17:50:10 -05:00
Jesse Beder c664d50d5c Fixed double quote escapes (e.g., \n is now that instead of \x0a) 2012-05-22 17:45:31 -05:00
Jesse Beder b8a87c43bc Added flow seq 2012-05-22 15:42:45 -05:00
Jesse Beder 944ebb7d1e Fixed settings reverting properly 2012-05-22 15:00:10 -05:00
Jesse Beder bf07af52ff Added long key 2012-05-22 14:26:34 -05:00
Jesse Beder 41e4cd3308 Split block map simple/long key for both key/value 2012-05-22 14:20:50 -05:00
Jesse Beder 952fe51c73 Added writing float/double 2012-05-22 13:59:31 -05:00
Jesse Beder c95bcae49f Added writing integral types 2012-05-22 13:57:44 -05:00
Jesse Beder 879f96d2f6 Tweak sandbox 2012-05-22 12:59:58 -05:00
Jesse Beder 80823583a0 Tweaked spacing for comments 2012-05-22 12:54:54 -05:00