Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ DerivedData
# CocoaPods
Pods

.project
.vscode
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.0)

project(libyaml-cpp)

add_library(libyaml-cpp
src/MapObject.cpp
)

target_link_libraries(libyaml-cpp yaml)

set_property(TARGET libyaml-cpp PROPERTY CXX_STANDARD 17)
34 changes: 34 additions & 0 deletions libyaml-0.2.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
*.BAK
*.a
*.cmake
*.dll
*.exe
*.la
*.lo
*.log
*.o
*.pc
*.so
*.trs
*~
.deps/
.libs/
/Testing/
libtool
CMakeCache.txt
CMakeFiles/
GNUmakefile
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config
config.h*
config.status
configure
example-deconstructor*
example-reformatter*
run*
stamp-h1
test-*
!config/config.h.in
1 change: 1 addition & 0 deletions libyaml-0.2.1/.indent.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-kr -nut -nce -l250
63 changes: 63 additions & 0 deletions libyaml-0.2.1/.makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This file is used for common development targets that can be done with
# needing the cumbersome bootstrapping process.
#
# You can use it like this:
#
# make -f .makefile indent
#
# If you copy or link this file to `GNUmakefile` then you can just do:
#
# make indent
#
# When copied to `GNUmakefile`, this file is can also be used for bootstrapping
# Makefile targets. Since GNUmakefile is loaded before Makefile, we do the
# bootstrapping tasks need to get a Makefile first, then we use the Makefile to
# make our target.

# Remind user when they are using GNUmakefile:
ifeq ($(lastword $(MAKEFILE_LIST)),GNUmakefile)
$(info *** NOTE: GNUmakefile in use. ***)
endif

MAKE_TARGETS := \
all \
all-am \
all-recursive \
install \
test \
test-all \
test-suite \

# SOURCE_FILES := $(shell find . | grep '\.c$$')
SOURCE_FILES := $(shell find tests/run-test-suite | grep '\.c$$')
ifneq ($(shell which gindent),)
INDENT := gindent
else
INDENT := indent
endif

#
# Proxy make targets:
#
default: all

# Proxy these targets to the real Makefile, after bootstrapping is necessary.
$(MAKE_TARGETS): Makefile
@make -f $< $@

Makefile: Makefile.in
./configure

Makefile.in:
./bootstrap

#
# Development make targets:
#
indent:
$(INDENT) $(SOURCE_FILES)

distclean purge:
git clean -dxf -e GNUmakefile
rm -fr tests/run-test-suite
git worktree prune
27 changes: 27 additions & 0 deletions libyaml-0.2.1/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: c

matrix:
include:
- os: linux
compiler: gcc
sudo: required
- os: linux
compiler: clang
sudo: required
- os: osx
compiler: gcc
- os: osx
compiler: clang

before_install:

# Travis branch-specific clone problem workaround:
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch

- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install --user scikit-ci-addons==0.15.0;
ci_addons travis/install_cmake 3.2.0;
fi

script: tests/run-all-tests.sh
160 changes: 160 additions & 0 deletions libyaml-0.2.1/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@

cmake_minimum_required(VERSION 3.0)
project (yaml C)

set (YAML_VERSION_MAJOR 0)
set (YAML_VERSION_MINOR 1)
set (YAML_VERSION_PATCH 7)
set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VERSION_PATCH}")

option(BUILD_SHARED_LIBS "Build libyaml as a shared library" OFF)

#
# Output directories for a build tree
#
if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif()

#
# Install relative directories
#
if(NOT DEFINED INSTALL_LIB_DIR)
set(INSTALL_LIB_DIR lib)
endif()
if(NOT DEFINED INSTALL_BIN_DIR)
set(INSTALL_BIN_DIR bin)
endif()
if(NOT DEFINED INSTALL_INCLUDE_DIR)
set(INSTALL_INCLUDE_DIR include)
endif()
if(NOT DEFINED INSTALL_CMAKE_DIR)
set(INSTALL_CMAKE_DIR cmake)
endif()

#
# Build library
#
set(SRCS
src/api.c
src/dumper.c
src/emitter.c
src/loader.c
src/parser.c
src/reader.c
src/scanner.c
src/writer.c
)

set(config_h ${CMAKE_CURRENT_BINARY_DIR}/include/config.h)
configure_file(
cmake/config.h.in
${config_h}
)

add_library(yaml ${SRCS})

if(NOT BUILD_SHARED_LIBS)
set_target_properties(yaml
PROPERTIES OUTPUT_NAME yaml_static
)
endif()

set_target_properties(yaml
PROPERTIES DEFINE_SYMBOL YAML_DECLARE_EXPORT
)

target_compile_definitions(yaml
PRIVATE HAVE_CONFIG_H
PUBLIC
$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:YAML_DECLARE_STATIC>
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS>
)

target_include_directories(yaml PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>
)

#
# Install rules
#
install(
FILES
include/yaml.h
${config_h}
DESTINATION include COMPONENT Development
)

install(
TARGETS yaml
EXPORT yamlTargets
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT Runtime
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT Development
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT Development
)

#
# Add tests
#
include(CTest) # This module defines BUILD_TESTING option
if(BUILD_TESTING)
add_subdirectory(tests)
endif()

#
# Generate 'yamlConfig.cmake', 'yamlConfigVersion.cmake' and 'yamlTargets.cmake'
#
include(CMakePackageConfigHelpers)

# Configure 'yamlConfig.cmake' for a build tree
set(CONFIG_DIR_CONFIG ${PROJECT_BINARY_DIR})
set(config_file ${PROJECT_BINARY_DIR}/yamlConfig.cmake)
configure_package_config_file(
yamlConfig.cmake.in
${config_file}
INSTALL_DESTINATION ${PROJECT_BINARY_DIR}
PATH_VARS CONFIG_DIR_CONFIG
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)

# Configure 'yamlTargets.cmake' for a build tree
export(TARGETS yaml
FILE ${PROJECT_BINARY_DIR}/yamlTargets.cmake
)

# Configure and install 'yamlConfig.cmake' for an install tree
set(CONFIG_DIR_CONFIG ${INSTALL_CMAKE_DIR})
set(install_config_file ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yamlConfig.cmake )
configure_package_config_file(
yamlConfig.cmake.in
${install_config_file}
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}
PATH_VARS CONFIG_DIR_CONFIG
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
install(
FILES ${install_config_file}
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
)

# Configure and install 'yamlTargets.cmake' for an install tree
install(EXPORT yamlTargets
FILE yamlTargets.cmake
DESTINATION ${INSTALL_CMAKE_DIR}
COMPONENT Development
)

# Configure 'yamlConfigVersion.cmake' for a build tree
set(config_version_file ${PROJECT_BINARY_DIR}/yamlConfigVersion.cmake)
write_basic_package_version_file(
${config_version_file}
VERSION ${YAML_VERSION_STRING}
COMPATIBILITY AnyNewerVersion
)
# ... and install for an install tree
install(
FILES ${config_version_file}
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
)
3 changes: 2 additions & 1 deletion yaml-0.1.5/LICENSE → libyaml-0.2.1/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2006 Kirill Simonov
Copyright (c) 2017-2018 Ingy döt Net
Copyright (c) 2006-2016 Kirill Simonov

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
36 changes: 36 additions & 0 deletions libyaml-0.2.1/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Run `./bootstrap` to generate the "Makefile.in" files in this directory and
## the "$SUBDIRS" subdirectories.

SUBDIRS = include src . tests

EXTRA_DIST = README LICENSE CMakeLists.txt doc/doxygen.cfg

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = yaml-0.1.pc

maintainer-clean-local:
rm -f aclocal.m4 config.h.in configure config/*
-find ${builddir} -name Makefile.in -exec rm -f '{}' ';'

distclean-local:
rm -fr tests/run-test-suite
-git worktree prune

.PHONY: bootstrap
bootstrap: maintainer-clean
./bootstrap
./configure
make

test: all
make -C tests check-TESTS

test-suite: tests/run-test-suite
make -C $< test

test-all: test test-suite

tests/run-test-suite:
-git branch --track run-test-suite origin/run-test-suite
-git worktree prune
git worktree add $@ run-test-suite
32 changes: 32 additions & 0 deletions libyaml-0.2.1/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
LibYAML - A C library for parsing and emitting YAML.

To build and install the library, run:
$ ./configure
$ make
# make install

If you checked the source code from the Git repository, run
$ ./bootstrap
$ ./configure
$ make
# make install

For more information, check the LibYAML homepage:
'https://github.com/yaml/libyaml'.

Discuss LibYAML with the maintainers in IRC #libyaml irc.freenode.net.

You may also use the YAML-Core mailing list:
'http://lists.sourceforge.net/lists/listinfo/yaml-core'.

Submit bug reports and feature requests to the LibYAML bug tracker:
'https://github.com/yaml/libyaml/issues/new'.

This project was developed for Python Software Foundation as a part of Google
Summer of Code under the mentorship of Clark Evans.

The LibYAML module was written by Kirill Simonov <xi@resolvent.net>.
It is currently maintained by the YAML community.

LibYAML is released under the MIT license.
See the file LICENSE for more details.
Loading