I suspect this this was a bit of an oversight when first setting up
appveyor for Windows/msvc, but 'release' does not match any target
cmake knows about; 'Release', however, does.
Signed-off-by: Marty E. Plummer <hanetzer@protonmail.com>
'config.h' is meant to be a convenience header to be #included at build
time, but not installed. Installing it can cause a host of problems for
various other projects (for instance, attempting to build u-boot from
source while another project's 'config.h' exists in the compiler search
path will cause build failures similar to:
https://github.com/pepe2k/u-boot_mod/issues/148
Further, I've changed '#include <config.h>' to '#include "config.h"',
which should constrain the search path to the current build directories,
so if another package with a bugged build has this file installed, it
will not cause yaml to miscompile/fail.
If you have a file `/usr/include/config.h` on your filesystem, query
your package manager to find out what package owns it, and file a bug
report against it with your distro maintainers.
Signed-off-by: Marty E. Plummer <hanetzer@protonmail.com>
You don't need to specify full paths to files if you do it like this.
Wildcard away most of the stuff you can, and for stuff you can't easily
wildcard, be as generic as you can.
Signed-off-by: Marty E. Plummer <hanetzer@protonmail.com>
William Roberts [Mon, 2 Oct 2017 22:40:22 +0000 (15:40 -0700)]
Update libyaml homepage link in README
Update the link to point where libyaml is now maintained. Per the old
link, "LibYAML is now maintained at https://github.com/yaml/libyaml.
This page is left for historical purposes."
Currently the cygwin autoconf builds only test builds of cygwin-native
binaries, and not mingw-w64 pure windows binaries. The resultant
cygyaml-0-2.dll has a runtime dep on the cygwin1.dll which is generally
not appropriate for the purpose of distribution. Building with mingw-w64
produces libraries with no dependency on the cygwin runtime.
Signed-off-by: Marty E. Plummer <hanetzer@protonmail.com>
Ingy döt Net [Sun, 7 Jan 2018 21:23:08 +0000 (13:23 -0800)]
Docker test file changes (added alpine testing)
Also reworked all the dockerfiles to be cleaner and consistent:
* Fixed some indentation
* Removed vim dependencies
* Collapsed RUN steps for less build layers
* Renamed dockerfiles/ to shorter and more adaptable docker/
Without this change building a dll with the mingw-w64 toolchain is
impossible. All tests from make test-all succeed on native linux
(Gentoo amd64 glibc default/linux/amd64/17.1/desktop gcc-7.2.0)
Signed-off-by: Marty E. Plummer <hanetzer@protonmail.com>
Ingy döt Net [Sat, 6 Jan 2018 08:03:42 +0000 (00:03 -0800)]
Fix problems in CI failures (travis and semaphore)
In the Makefile.am, switched out the fetch (which can have auth problems
in certain envs) with a simple branch per @perlpunk++'s suggestion.
With the new test branches, travis had a problem in that it only clones
one branch and we need the other branch refs to be available. Fixed this
by fetching the other branch refs. I also cleaned up the travis YAML
file.
The Ubuntu 14.04 docker image (used by semaphoreci) had an older git,
without the worktree command, so I made it install the latest git from a
ppa.
Renamed tests/run-tests.sh to tests/run-all-tests.sh for tab completion
conflict reasons.
* Add option BUILD_TESTING by default ON
See https://cmake.org/cmake/help/v2.8.12/cmake.html#module:CTest
* Simplify library type selection using standard option BUILD_SHARED_LIBS
See https://cmake.org/cmake/help/v3.0/variable/BUILD_SHARED_LIBS.html
yamlConfig.cmake
----------------
* Generate and install yamlConfig.cmake, yamlConfigVersion.cmake and yamlTargets.cmake
* Bump CMake version and explicitly associate include dirs with targets
See https://cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#include-directories-and-usage-requirements
* Ensure building against libyaml using "find_package(yaml)" uses expected compile options: Set HAVE_CONFIG_H
as private compile option, YAML_DECLARE_STATIC as public
Testing
-------
* Build all examples from "tests" directory
CMake Best practices
--------------------
* configure "config.h" based on version info found in CMakeLists.txt
It is not recommended to use GLOB to collect a list of source files from
the source tree. If no CMakeLists.txt file changes when a source is added
or removed then the generated build system cannot know when to ask CMake
to regenerate.
See https://cmake.org/cmake/help/v3.8/command/file.html
Compilation warnings
--------------------
* Set _CRT_SECURE_NO_WARNINGS if building using VisualStudio
This will avoid warnings like this one:
```
C:\projects\libyaml\tests\run-emitter.c(268): warning C4996: 'fopen':
This function or variable may be unsafe. Consider using fopen_s instead.
To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for
details.
```
Continuous Integration
----------------------
* travis: Install CMake >= 3.x using scikit-ci-addons
Ingy döt Net [Mon, 2 Jan 2017 00:49:18 +0000 (16:49 -0800)]
Add a `.makefile` for immediate make targets
We can add various development activities to this alternate Makefile.
If you do this first:
```
ln {.,GNU}makefile
```
then you can use the new targets and the old ones without specifying the
`.makefile` in make commands and without worrying about bootstrap.
ie Before this, to use Makefile targets, you needed to run `./bootstrap`
and `./configure` first. This file will proxy all common Makefile
targets, first making sure that the Makefile exists.
Ingy döt Net [Fri, 30 Dec 2016 21:54:54 +0000 (15:54 -0600)]
Get tests passing on Docker
The Dockerfiles needed to set LD_LIBRARY_PATH.
For some bizarre reason I needed to build the parser and emitter twice.
Since I plan to redo the building of these binaries later, this is OK
for now, since all tests on all CICDs will pass.
The docker stuff was needed by the semaphoreci system.
Ingy döt Net [Fri, 30 Dec 2016 02:14:14 +0000 (20:14 -0600)]
Include libyaml-test and libyaml-parser-emitter
Before the `make test-suite` command would clone yaml/libyaml-test which
would in tuen clone yaml/libyaml-parser-emitter. Now they are part of
the repository since they are not really useful outside the repository.
They still clone the data branch of yaml/yaml-test-suite. That is where
all the actual test data resides. That belongs outside the repo because
it is intended for all yaml frameworks.
Ian Cordasco [Tue, 27 Dec 2016 15:06:01 +0000 (09:06 -0600)]
Fix pointer warnings in example-deconstructor
There were several places in our test deconstructor where we were
passing plain char[]s to functions expecting (yaml_char_t *)s. Since we
will soon be forcing warnings to become errors, it makes sense to clean
these up.
Ingy döt Net [Wed, 14 Dec 2016 19:56:57 +0000 (20:56 +0100)]
Add Makefile support for yaml-test-suite
Add `test-suite` rule to Makefile. This test clones the libyaml-test
repo (which then clones the libyaml-parser and libyaml-emitter repos)
and calls `make test` in it. That in turn clone yaml/yaml-test suite.
Normally the subtests will clone the latest libyaml, but this test
passes the current libyaml via an environment variable.
Also add `test-all` to run this together with normal `make test` rule.
Ian Cordasco [Fri, 9 Dec 2016 13:02:23 +0000 (07:02 -0600)]
Use AM_CPPFLAGS since autotools deprecated INCLUDE
autoconf deprecated INCLUDE around version 2.69. No other automake file
in the project uses INCLUDE (instead they use AM_CPPFLAGS) and this
warning prevents the bootstrap-configure-make process from working on
OSX for me. Updating the variable name in the include/Makefile.am fixes
this and allows me to move along with development on OSX.