From 11dad4a8aeb8ae59e20dae0814ddb16fc388fc39 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Wed, 7 Sep 2016 17:19:00 -0500 Subject: [PATCH 1/4] Add simple releasing and packaging/installing guides. --- PACKAGING.md | 38 ++++++++++++++++++++++++++++++++++ RELEASING.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 PACKAGING.md create mode 100644 RELEASING.md diff --git a/PACKAGING.md b/PACKAGING.md new file mode 100644 index 000000000..208e259c8 --- /dev/null +++ b/PACKAGING.md @@ -0,0 +1,38 @@ +# Packaging or Installing MeTA + +Please follow these slightly modified build instructions if you are either +a packager and you want to make a package of MeTA for your distribution, or +if you simply want to install MeTA to e.g. `/usr/local`. + +You will need the following `cmake` flags: + +- `-DBUILD_SHARED_LIBS=On`: build `.so` libraries instead of `.a`. +- `-DBUILD_STATIC_ICU=On`: force building a static ICU library as part of + `meta-utf.so` to ensure Unicode standard stability. + +If you are building for a Linux platform, you *must* use GCC. **Do not use +Clang/libc++**, as the library throws exceptions and must be built in the +same way all other C++ applications on the system are expected to be built. + +MeTA will require [cpptoml][cpptoml] to be installed. This is +straightforward as cpptoml is header-only. Please follow the standard +`cmake` build instructions for cpptoml and package using `make install` to +install the CMake configuration files for cpptoml. This allows MeTA's CMake +configuration files to find cpptoml as a dependency. + +MeTA can then be installed using `make install`. + +# Using an Installed MeTA + +You can consume MeTA most easily by using a CMake build system (though you +do not have to). Your `CMakeLists.txt` might look something like the +following: + +```cmake +find_package(MeTA 2.4 REQUIRED) + +add_executable(my-program my_program.cpp) +target_link_libraries(my-program meta-index) # or any other MeTA libraries +``` + +[cpptoml]: https://github.com/skystrife/cpptoml diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 000000000..6bdab06b2 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,58 @@ +# Releasing MeTA Versions + +This document contains a checklist for releasing a version of MeTA so we +follow a consistent releasing process. + +1. Pick a version number. MeTA releases (Major.Minor.Patch) ought to be API + compatible with other releases that share the same Major and Minor + version numbers but different Patch versions. + + Major API changes (like new libraries or toolkit-wide backwards + incompatible API changes) increment the Major release number. Minor API + changes (like enhancements) increment the Minor release number. Patch + versions should be released only for bug fixes. + +2. Ensure `CHANGELOG.md` is up to date. + + If there are *any* breaking changes, mention these explicitly. If there + are migration strategies to work around these breaking changes, provide + a brief explanation (or a link to explain them). + +3. If there are major *or* minor API changes, ensure that the documentation + on the website (meta-toolkit/meta-toolkit.org) is correct. + + Update Doxygen as necessary. + +4. Ensure that the build is passing on both Travis (Linux + OS X) and + Appveyor (Windows/MinGW-w64). + +5. Merge branch `develop` into `master` with a commit message + + > Merge branch 'develop' for MeTA vX.Y.Z + + Use `git merge develop --no-ff` to create a merge commit. + +6. Tag the merge commit. The tag should be both annotated *and* signed: + + ``` + git tag -as vX.Y.Z + ``` + + The tag message should be the contents of the CHANGELOG for that + version. Remove unnecessary markdown syntax like header markers and code + blocks. Backticks can stay. + +7. Push the merge and the tags to GitHub: + + ``` + git push --follow-tags + ``` + +8. Create a release on GitHub using the new tag. Its title should be "MeTA + vX.Y.Z". + + The contents of the message should be exactly the same as the CHANGELOG + entry for that release. + +9. Upload the model files and include a section in the GitHub release notes + containing their sha256 sums. From 2c6e8a5c62a6bead11334a630d73b5eac020a5b8 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Thu, 8 Sep 2016 09:29:28 -0500 Subject: [PATCH 2/4] Silence double definition warnings on Darwin. We will eventually want to have those defines coming from config.h, but we'll need to reorder all includes project-wide to ensure config.h comes before even *system* headers. For now, the easiest way is to just continue to use command-line defines for the things we need to make sure are defined before *all* headers. --- include/meta/config.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/meta/config.h.in b/include/meta/config.h.in index 57353b7c6..63ed61b16 100644 --- a/include/meta/config.h.in +++ b/include/meta/config.h.in @@ -4,7 +4,7 @@ #include "meta/kludges.h" // OS X -#cmakedefine META_IS_DARWIN -#cmakedefine _DARWIN_USE_64_BIT_INODE +//#cmakedefine META_IS_DARWIN +//#cmakedefine _DARWIN_USE_64_BIT_INODE #endif From a7459f3507bb1bdb17c3718ee70c9e37debc5cf5 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Thu, 8 Sep 2016 09:35:19 -0500 Subject: [PATCH 3/4] Fix issue with finding config.h when used as a sub-project. include_directories() doesn't propagate to parent projects, so they would fail to find meta/config.h. By adding this to meta-definitions, it now propagates through that library's INTERFACE properties. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4da54cbe2..18d59e9cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,7 +112,9 @@ endif() CompilerKludges(meta/kludges.h) configure_file(include/meta/config.h.in meta/config.h) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(meta-definitions INTERFACE + $ + $) cmake_pop_check_state() From b7a71f29f3887a33b84bc953ef7649ec42b951a1 Mon Sep 17 00:00:00 2001 From: Chase Geigle Date: Thu, 8 Sep 2016 10:32:46 -0500 Subject: [PATCH 4/4] Update CHANGELOG for v2.4.1. --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb201b57b..4a0ff7e16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [v2.4.1][2.4.1] +## Bug fixes +- Eliminate excess warnings on Darwin about double preprocessor definitions +- Fix issue finding `config.h` when used as a sub-project via + add_subdirectory() + # [v2.4.0][2.4.0] ## New features - Add a minimal perfect hashing implementation for `language_model`, and unify @@ -476,7 +482,8 @@ # [v1.0][1.0] - Initial release. -[unreleased]: https://github.com/meta-toolkit/meta/compare/v2.4.0...develop +[unreleased]: https://github.com/meta-toolkit/meta/compare/v2.4.1...develop +[2.4.1]: https://github.com/meta-toolkit/meta/compare/v2.4.0...v2.4.1 [2.4.0]: https://github.com/meta-toolkit/meta/compare/v2.3.0...v2.4.0 [2.3.0]: https://github.com/meta-toolkit/meta/compare/v2.2.0...v2.3.0 [2.2.0]: https://github.com/meta-toolkit/meta/compare/v2.1.0...v2.2.0