diff options
author | Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com> | 2017-11-30 08:14:27 -0500 |
---|---|---|
committer | Ian Stapleton Cordasco <graffatcolmingov@gmail.com> | 2017-11-30 07:14:27 -0600 |
commit | fe3d086fa75a289d6e4085df6f855f4c88c8d7c2 (patch) | |
tree | 02cc993cdd3d0322861daf4eb09ad636afeb4cd3 /Makefile.am | |
parent | 660242d6a418f0348c61057ed3052450527b3abf (diff) | |
download | libyaml-git-fe3d086fa75a289d6e4085df6f855f4c88c8d7c2.tar.gz |
Improve CMake build system
New build options
-----------------
* 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
* Ensure buildsystem re-generation listing sources (best-practice)
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
* Add comments to appveyor.yml and run-tests.sh
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index 6425b6b..d682892 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ## Run `./bootstrap` to generate the "Makefile.in" files in this directory and ## the "$SUBDIRS" subdirectories. -SUBDIRS = include src . tests win32 +SUBDIRS = include src . tests EXTRA_DIST = README LICENSE CMakeLists.txt doc/doxygen.cfg |