Commit Graph

849 Commits

Author SHA1 Message Date
Stefan Seefeld
51cf617c63 Fix 'raw' IO extension. 2018-07-15 20:37:06 -04:00
Mateusz Loskot
c192814572
Merge pull request #115 from mloskot/ml/contributing-fix-toc [ci skip]
Fix TOC internal links in CONTRIBUTING.md
2018-07-04 01:38:41 +02:00
Mateusz Loskot
6f31114155
Merge pull request #114 from mloskot/ml/fix-doc-link-to-stable [ci skip]
Update documentation link in README
2018-07-04 01:36:18 +02:00
Mateusz Łoskot
4811017934 Fix TOC internal links in CONTRIBUTING.md [ci skip] 2018-07-04 01:34:13 +02:00
Mateusz Łoskot
ddced0fa71 Update documentation link in README [ci skip]
Point to documentation generated from latest master branch
2018-07-03 23:45:57 +02:00
Mateusz Loskot
38c36c6b01
Merge pull request #113 from mloskot/ml/intro-pull-requests-protocol [ci skip]
Require PRs to be based on develop, and never on master
2018-07-03 21:08:05 +02:00
Mateusz Loskot
88017e792d
Merge pull request #112 from mloskot/ml/doc-tutorial-embed-video
[doc] Embed original video by Lubomir Bourdev in Tutorial
2018-07-03 21:06:56 +02:00
Mateusz Łoskot
1fc2f43fb3 Require PRs to be based on develop, and never on master [ci skip] 2018-07-03 18:05:20 +02:00
Mateusz Łoskot
837dbd9a3c [doc] Embed original video by Lubomir Bourdev in Tutorial
This video lecture was originally published at
https://stlab.adobe.com/gil/presentation/index.htm

Boost.GIL maintainers received agreement from Lubomir Bourdev to
copy and preseve the original video:
https://lists.boost.org/boost-gil/2018/06/0032.php

The lecture has also been archived by Sean Parent (Adobe) at
https://youtu.be/RjNz_sl-eXk
Thanks to Sean for sharing .MOV file he captured from the original server.
2018-07-03 17:29:07 +02:00
Mateusz Loskot
439d2e67e7
Merge pull request #111 from mloskot/ml/circleci-fix-branch-filter
[circleci] Allow only master and develop branches for all build jobs
2018-06-27 22:03:45 +02:00
Mateusz Łoskot
ba518df03a [circleci] Allow only master and develop branches for all build jobs
CircleCI 2.0 does not yet support branch filtering per workflow.
2018-06-27 21:11:55 +02:00
Stefan Seefeld
089ca49085 A few more CI fixes. 2018-06-27 08:10:32 -04:00
Mateusz Loskot
0216ea4fe8 [circleci] Enable for master branch 2018-06-27 07:37:19 -04:00
Stefan Seefeld
51028a2335 Fix documentation upload process. 2018-06-27 00:42:30 -04:00
Mateusz Łoskot
e0ef163d2b [travis] Allow failures for variant=ubsan_integer
Currently, UBSan integer checks report several false positives due to
unsigned integer overflows (well-defined).
Instead of hiding them completely, keep them displayed on the matrix
until we decide how to handle. For example, there may be some issues
regarding size of unsigned type used, etc.

Sort variant=ubsan_* jobs.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
c95bcf96ad Remove #define GIL_VERSION "2.1.2"
The macro was replaced by recently added gil/version.hpp

Closes #82
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
a000f26cf4 Fix mention links in CONTRIBUTING.md [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
e4322aa094 Remove dependency on Boost.SmartPtr
Replace boost::shared_ptr with C++11 std::shared_ptr.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
abb260ed05 [cmake] Add targets for individual I/O format tests
Unify tests set with Jamfile and fabscript definitions.
Search for libtiffxx and tiffio.hxx with C++ stream
interface for TIFF - required by I/O.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
81db99b734 Resolve ambiguous ofstream due to imported std and filesystem namespaces
Replace using namespace std import with full std:: qualification.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
a435900b34 Remove dependency on boost::lexical_cast
Replace lexical_cast with C++11 std::to_string function.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
8e1db33826 Remove dependency on boost::array
Replace boost::array with C++11 std::array.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
472d1e57d3 Fix warning: extra ';' [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
3d311c68e3 [appveyor] List required Boost libraries explicitly
Group list of deps for easy identification of direct ones.
Add --quiet option to git submodule commands on Travis CI.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
550be8fd32 [travis] Group list of deps for easy identification of direct ones [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
2c5e0d227d [travis] List required Boost libraries explicitly [skip appveyor]
tools/boostdep/depinst/depinst.py helper automatically calculates
maximum set of required Boost libraries, based on #include-s.

Manual listing should help to control any new additions
and prevent introduction of unwanted dependencies.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
cc6ba0ae72 Disable unaligned pointer access
Rename GIL_NONWORD_POINTER_ALIGNMENT_SUPPORTED
    to BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS.
Undefine BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS by default and document it.
If defined, issue warning or error, depending on target platform.

This changes how packed_channel_reference_base-based channels perform
access - aligned memory access by default.

This also fixes undefined behavior detected by UBSan in some test cases.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
30c249de9e [doc] Add BOOST_GIL_DOXYGEN_ONLY to Doxyfile [ci skip]
To be used as #ifdef test for definitions that should be preprocessed
only by Doxygen, but skipped during normal compilation.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
0963021f8b [doc] Remove unused Doxygen predefine ADOBE_GIL_STANDALONE_DOCUMENTATION [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
f3d80cfddb [b2] Add -Wcast-align to <cxxflags> for GCC/clang [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
189889e39f Add Boost.Build variants for UBSan-enabled builds
The build variants enable group of checks offered by clang
UndefinedBehaviorSanitizer detector.

Add sanitizers suppression file in .ci/blacklist.supp based on
copy of the file from Boost.Beast.

Update Travis CI:
  - Add .ci/build-and-test.sh script as handy proxy for b2 command.
  - Add build jobs for each of the three new UBSan variants.
  - Display COMPILER and VARIANT first as these two are most important
    details while inspecting the build matrix
    (TOOLSET can be derived from COMPILER).
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
472ec6bafc [doc] Describe development workflow using CMake [ci skip]
Add "Using Faber" section.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
bfb0c15323 [cmake] Update FindBoost.cmake auto-download instructions [ci skip]
Add GIL_DISABLE_FINDBOOST_DOWNLAOD option (default=OFF).
Output values of Boost_INCLUDE_DIRS and BOOST_LIBRARY_DIRS
  - should help to know which Boost we are building GIL against.
Fix add_executable with empty sources list.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
2476006f9f Fix typo [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
5c2ad8d142 [circleci] Remove gcc 4.7 build jobs [ci skip]
First GCC 4.8.1 was the first feature-complete implementation of C++11.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
94f5ad613a Use promote_integral in channel_invert algorithm
This should help to avoid UB due to possible signed integer overflows,
for minimum/maximum of input channel domain.

Fixes #89
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
7f6eb255c7 Simplify pull template sections [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
2658e2059a Replace some of Boost.MPL and Boost.TypeTraits with C++11 equivalents
Non-functional refactoring of promote_integral added in #91
Clean up 128-bit support remains.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
b8af11db87 Add promote_integral metafunction
Copied from Boost.Geometry, including original tests, with some non-functional
modifications explained in the comments.
The utility can be used where it is important to avoid integer overflow.
2018-06-27 00:02:27 -04:00
Mateusz Łoskot
57693484df Suggest use of --jobs N for git commands where applicable
[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
41c87d8cbc [circleci] Add GCC 8.1 jobs to workflow 2018-06-27 00:02:27 -04:00
Mateusz Loskot
9f4bc93ad6 Replace boost::integer_traits with std::numeric_limits
std::numeric_limits<T>::max() is constexpr since C++11
2018-06-27 00:02:27 -04:00
Mateusz Loskot
a6795334d3 [test] Verify channel_minmax values against std::numeric_limits 2018-06-27 00:02:27 -04:00
Mateusz Loskot
73ec99e606 Refactor single-program channel test to Boost.Test suites and cases
Motivation:
- state clearly what is covered with tests without reading non-trivial code
- avoid cleverness - tests should be no-brainer
- get closer to one test case targets one feature/beaviour with one check
- replace obscure `throw std::exception` with diagnostics that are actually
  useful to pin-point failure cause and location - makes CI logs useful.
- allow to select and run specific tests
- make tests maintenance easy, quick and fun

Propose new structure of tests that reflects the previous tests hierarchy,
but organizes channel tests in test/channel directory with test programs
each covering specific library feature (or set of closely related features).

The refactored tests cover 100% of checks from the old `channel.cpp`,
plus it refines or adds a bunch more.
NOTE: old test/channel.cpp has not been removed yet.

Common definitions from the single test/channel.cpp moved to
channel_test_fixtures.hpp and namespace boost::gil::test::fixture:
Classes and typedefs:
- `do_test` as `fixture::channel`
- `value_core` as `fixture::channel_value`
- `reference_core` as `fixture::channel_reference`
- `packed_reference_core` as `fixture::packed_channel_reference`
- `packed_dynamic_reference_core` as `fixture::packed_dynamic_channel_reference`
- `channel_archetype` and relatives to `channel_concepts.cpp` which is compile
   test in Jamfile
- `test_packed_channel_reference()` parts as `fixture::packed_channels565`
- `test_packed_dynamic_channel_reference()` parts as `fixture::packed_dynamic_channels565`
Test case functions called from `do_test<T>::test_all`:
- `test_channel_invert()` to `algorithm_channel_invert.cpp` suite
- `test_channel_convert()` to `algorithm_channel_convert.cpp` suite
- `test_channel_multiply()` to `algorithm_channel_multiply.cpp` suite
- `test_channel_math()` split to `algorithm_channel_relation.cpp`
   and `algorithm_channel_arithmetic.cpp`

Add test cases for each channel value type T as used to run from
`test_channel_value_impl<T>`, `test_packed_channel_reference<T>` and
`test_packed_dynamic_channel_reference<T>`.

Add list of possible T-s defined as type-lists `fixture::channel_byte_types`,
`fixture::channel_integer_types`, `channel_float_types` and
`channel_bitfield_types` which used with `BOOST_AUTO_TEST_CASE_TEMPLATE`
generate all possible combination of inputs.

Add new `channel_test_fixture.cpp` is a self-test suite verifying the fixtures.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
b80667f0c6 [io/bmp] Explain DIB orientation variants that affect reading
Trim trailing whitespaces (.editorconfig)

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
4bc6575f5f Build tests with -fsanitize=undefined
Sort common compilation flags
2018-06-27 00:02:27 -04:00
Mateusz Loskot
69101e6dc9 [cmake] Tidy up
[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
87b7fdbcab [msvc] Build tests with NOMINMAX to suppress min/max macros 2018-06-27 00:02:27 -04:00
Mateusz Loskot
b0627dd1dc Clarify console input belongs to listed steps
Fenced code in numbered or bullet list works in Markdown.

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
a872cea86b Add TIP about complete clean-up and reset of super-project repository
[ci skip]
2018-06-27 00:02:27 -04:00