Commit Graph

849 Commits

Author SHA1 Message Date
Mateusz Łoskot
37cc050785
Update build status with new compiler and C++ versions [ci skip] 2019-02-06 10:13:18 +01:00
Mateusz Łoskot
6763a8cd98
Build core tests with BOOST_GIL_USE_CONCEPT_CHECK defined (#230)
when building tests with both, Boost.Build and CMake.

Disable concepts check for tests where range (e.g. std::array)
used as image pixel - not fully specialised as acceptable pixel type.

Ignore warnings from boost/concept_check.hpp
Rationalise uses of GCC and clang diagnostic push/pop,
with adding constraint for GCC 4.6+ as minimum version
where the pragma was introduced.

Closes #228
2019-02-05 22:19:35 +00:00
Mateusz Łoskot
24f4873364
[azure] Suppress all b2 informational messages when installing Boost
Add missing build step name.
2019-02-05 20:20:27 +01:00
Mateusz Łoskot
1351009c0d
[azure] Add C++14 builds using GCC 8 and VS2017 (#233) 2019-02-05 19:18:32 +00:00
Samuel Debionne
2308a1a85a Use Boost.Variant instead of GIL's own variant implementation (#231)
Adds support C++11 decltype(auto)

Fixes #131
2019-02-05 00:47:08 +00:00
Mateusz Łoskot
2dc8ad8fac
Ignore -Wfloat-equal warning in old test code
This ignores the warning in the test code only, not in GIL headers and
the old test has compared float-point numbers with == or  != forever,
so this does not ignore anything new.
2019-02-04 23:09:17 +01:00
Mateusz Łoskot
cd2ad3b75b
Replace boost::is_pointer with std::is_pointer in static_assert 2019-01-27 23:37:39 +01:00
Mateusz Łoskot
12e68d4d2c
Tidy up uses of Boost.Filesystem in IO (#226)
Remove unused #include-s and leave io/test/paths.hpp as sole
place of #include <boost/filesystem.hpp> for IO tests.
Silence annoying -Wconversion or -Wshorten-64-to-32 warning
from Boost.SmartPtr via Boost.Filesystem:
  conversion to 'std::atomic<int>::__integral_type {aka int}'
    from 'long int' may alter its value
2019-01-27 22:11:03 +00:00
Mateusz Łoskot
45ca507ca3
Replace some uses of boost::is_same with std::is_same (#225)
Those are places boost::is_same can be replaced in non-intrusive way.
Remaining are types derived from boost::is_same, where the replacing
would affect all their uses - effectively switching from boost::true_/false_ types
to std::true_type and std::false_type.
Such change needs to come along with Boost.MPL to MP11 migration.
2019-01-27 10:54:05 +00:00
Mateusz Loskot
afcdeb04cd
Fix GCC -Wunused-but-set-variable warning in toolbox tests (#219)
Fixes at least eight warnings issued by in the toolbox tests:
  warning: variable (...) set but not used [-Wunused-but-set-variable]

Add new or improve existing BOOST_TEST checks.
2019-01-20 18:46:21 +01:00
Mateusz Loskot
54b9dc7382
Fix GCC -Wunused-local-typedefs warning in toolbox tests (#218)
Fixes at least three warnings issued by in the toolbox tests:
  warning: typedef (...) locally defined
    but not used [-Wunused-local-typedefs]
2019-01-20 18:06:12 +01:00
Mateusz Łoskot
5a35676a06
Update badges in README [ci skip]
Add badges to wandbox, conan and vcpkg.
Tidy up and replace .png with .svg for better rendering.
2019-01-20 10:44:07 +01:00
Mateusz Loskot
83a735a09c
Fix GCC -Wunused-parameter warnings (#221) 2019-01-20 09:37:31 +01:00
Mateusz Loskot
e22c7cb108
Fix GCC -Wsign-compare warning in tests (#217)
Fixes at least two warnings issued by channel tests due to
comparison of unsigned channel value with signed integer 1:

../../boost/test/tools/assertion.hpp:72:13:
  warning: comparison between signed and unsigned
    integer expressions [-Wsign-compare]
2019-01-19 15:05:35 +01:00
Mateusz Loskot
585e9226c8
Update CONTRIBUTING.md with PRs do's and don'ts [ci skip] (#216)
This update does not introduce any major modification to the current
workflow, it adds a more formal description of it.
Copied from CoreFX guidelines at
https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/contributing.md
with minor updates (e.g. to allow work-in-progress PRs).
2019-01-18 15:52:43 +01:00
Mateusz Loskot
54f1817e99
Replace boost::enable_if with std::enable_if (#215)
Replace boost::disable_if with std::enable_if and negated condition.
Update mpl::and_ expressions to yield value convertible to bool, instead of type.
Format std::enable_if expressions and nearby code they are nested in.
Replace complex template-based leading return type of functions
  with auto and trailing return type for greater readability.
Replace some Boost type traits with <type_traits> features.
Replace 0 with nullptr where modernize-use-nullptr missed (updates #180).

Notice, boost::lazy_enable_if in extension/toolbox has not been replaced,
but it seems it could have been - need verification with number of compilers.
2019-01-18 09:31:58 +01:00
Mateusz Loskot
40e158b26b
Fix warning: suggest parentheses around assignment used as truth value (#214)
Tidy up around the fix.
2019-01-16 12:29:36 +01:00
Mateusz Łoskot
e3ef52bb80
Correct order of constexpr and type specifier
The constexpr belongs to the declaration specifiers (like static) and
not just the type specifiers (like cv-qualifiers), so it binds to
the declaration (like static), not the type (like const).

Refines #211
2019-01-15 00:42:20 +01:00
Mateusz Loskot
da6acc6cca
Remove uses of Boost.Function (#213)
Remove uses of boost::mem_fn (missing from Bind.Bind removal in #212).
2019-01-13 06:32:20 +01:00
Mateusz Loskot
78b7dcfeca
Remove uses of Boost.Bind and Boost.Lambda (#212)
Replace with std::bind and C++11 lambda functions.
The two Boost libraries should no longer be a direct
dependency of Boost.GIL.
2019-01-13 02:03:25 +01:00
Mateusz Loskot
a2b2ca977a
Replace BOOST_STATIC_CONSTANT with constexpr (#211)
Tidy up formatting of refactored parts of code.
2019-01-12 23:57:35 +01:00
Mateusz Loskot
fb19a1205d
Apply clang-tidy modernize-use-using to all examples (#210)
Run clang-tidy 7.0 with -checks='-*,modernize-use-using' -fix
against TU-s of examples.

Manually refactor numerous typedef-s where missed by modernize-use-using
check, not uncommon in code snippets in comments.

Outcome is that searching for lower-case whole word typedef
in sources of all the tests should return only handful of matches
in boost/gil/extension/dynamic_image/apply_operation_base.hpp
2019-01-12 17:36:29 +01:00
Mateusz Loskot
f578a8be9c
Replace assert() macro with BOOST_ASSERT() macro (#208)
Add #include <boost/assert.hpp> where necessary.
Apply minor clean-up near the macro replacements.

Closes #96
2019-01-12 10:21:01 +01:00
Mateusz Loskot
6e3ccc00b1
Remove dependency on Boost.StaticAssert (#207)
Replaced BOOST_STATIC_ASSERT with C++11 binary static_assert,
with empty message.

In future, this should make it possible to automatically refactor
into C++17 unary static_assert using clang-tidy and
its modernize-unary-static-assert check.

Closes #106
2019-01-11 10:33:09 +01:00
Mateusz Łoskot
7722f08c80 [circle] Add separator [ci skip] 2019-01-10 21:45:31 +01:00
Mateusz Loskot
09e2915364
Remove pre-C++11 version of test pixels generator (#206)
Since GIL requires minimum C++11, this was a dead code.
2019-01-06 15:03:25 +01:00
Mateusz Łoskot
ff5ddb4d93
[cmake] Make purpose of CMake clear [ci skip]
The CMake configuration is only provided for convenience
of contributors. It does not export or install any targets,
deploy config files or support subproject workflow.
2019-01-06 00:49:28 +01:00
Mateusz Łoskot
73edd31781
[cmake] Add GIL_BUILD_HEADERS_TESTS option [ci skip]
Allows to avoid generating lots of headers tests,
if unnecessary, e.g. while developing in IDE.
2019-01-05 23:01:37 +01:00
Mateusz Łoskot
8ecc659854 [cmake] Allow to specify newer version of C++ 2019-01-05 22:07:19 +01:00
Mateusz Łoskot
61ab03e149 Tidy up README
[ci skip]
2019-01-05 00:54:56 +01:00
Mateusz Łoskot
ff2b0a4033 Shorten GCC versions list
[ci skip]
2019-01-05 00:52:50 +01:00
Mateusz Łoskot
0b49081fa3 Fix Visual Studio name and shorten GCC versions list
[ci skip]
2019-01-05 00:50:22 +01:00
Mateusz Łoskot
3b502b377d
Update build status table in README
[ci skip]
2019-01-05 00:45:08 +01:00
Mateusz Loskot
643c050bb5
Add configuration for CI builds with Azure Pipelines (#205)
Configuration summary:
  - Linux (GCC 5.4), Windows (VS2017), Mac OS (clang 4.0)
  - Boost 1.68 built with variant=release
  - Boost.GIL built and tested using CMake w/ CMAKE_BUILD_TYPE=Release
  - Basic setup of GIL IO extension dependencies is in place,
    using .deb packages or Conan.
  - Build without GIL IO extension tests due to issues in CMake
    configuration, not related to Azure Pipelines.

Closes #188

[skip appveyor]
[skip travis]
2019-01-04 22:15:51 +01:00
Mateusz Łoskot
9ed79d93c8
[cmake] Shuffle sections with options and C++ flags [ci skip] 2019-01-04 15:59:19 +01:00
Mateusz Łoskot
a92ea3133b
[cmake] Skip tests for IO RAW headers if libraw not found [ci skip] 2019-01-04 14:39:56 +01:00
Mateusz Łoskot
6d0729b86b
[cmake] Allow LibRaw to be optional dependency of IO [ci skip]
It is not easy to install pre-built libraw on Windows and Mac OSX:
  - Conan does not seem to offer it
  - Vcpkg does offer to be build it, but CI resources are too precious.
2019-01-04 14:06:25 +01:00
Mateusz Łoskot
762af55d08
[appveyor] Update list of allow_failures jobs 2019-01-04 10:53:19 +01:00
Mateusz Łoskot
86a30a2484 Switch from header-only to linked boost_unit_test_framework
The linked variant of the Boost.UTF seems recommended.
It may help to avoid mysterious run-time error on Mac OS:
    boost::runtime::access_to_missing_argument:
    There is no argument provided for parameter color_output
It also may speed up compilation during CI builds.
2019-01-03 23:53:54 +01:00
Mateusz Łoskot
65b8b1d91f [cmake] Update conan.cmake download to v0.13 [ci skip] 2019-01-02 22:37:44 +01:00
Mateusz Łoskot
459b75775b [cmake] Require I/O dependencies if GIL_ENABLE_EXT_IO
Use FindLibRaw.cmake downloaded from LibRaw repository.
2019-01-01 22:18:03 +01:00
Mateusz Loskot
a4185bcea2
Remove Boost.Bind from extension/dynamic_image (#202)
Replace boost::bind with std::bind from C++11.
Move template parameter comments to Doxygen \tparam-s,
so they are captured as proper documentation.
Tidy up code formatting.
2018-12-20 16:51:20 +01:00
Mateusz Łoskot
d436fcb899
Rename azure-pipelines.yml to .azure-pipelines.yml [skip appveyor] [skip travis]
May disable Azure Pipelines builds, temporarily, until actual minimal
build configuration is in place.

Related to #188
2018-12-19 00:58:47 +01:00
azure-pipelines[bot]
42824b1f37 First stab at CI with Azure Pipelines [skip appveyor] [skip travis]
Add sample config file, no-op build.
2018-12-18 23:49:09 +00:00
Mateusz Łoskot
11ac19ddc1
Add cpplang.slack.com room #boost_user [ci skip] 2018-12-18 23:09:43 +01:00
Mateusz Łoskot
ed0e8b0788
Add Mateusz Loskot to maintainers [ci skip]
Add Christian Henning to authors.
2018-12-18 23:04:51 +01:00
Mateusz Łoskot
602d51d05a
Follow up feature/cmake-config merged to boostorg/boost develop
Details at https://lists.boost.org/Archives/boost/2018/12/244697.php
2018-12-18 22:47:26 +01:00
Mateusz Loskot
2233fb166a
Remove Boost.Bind from io (#203)
Replace Boost.MPL boolean constants with C++11 equivalents.
Replace `throw()` with `noexcept`.
Replace empty constructor body with `default`.
Rename private class members to avoid leading underscore
(too easy to confuse as reserved identifier).
Tidy up with compact formatting.
2018-12-18 18:50:57 +01:00
Mateusz Loskot
06d1dbb066
Fix hard-wired use of Boost.Array static_size member (#200)
Fixes #142
2018-12-18 11:57:32 +01:00
Mateusz Loskot
f3795176fc
Fix examples to make them compile again (#201)
Following release of the new IO in Boost 1.68, the examples stopped compiling.

Fixes #40
2018-12-18 01:13:10 +01:00