2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-26 06:32:16 +00:00

37 Commits

Author SHA1 Message Date
René Ferdinand Rivera Morell
8fd5cc5b32 Add support for modular build structure. (#752)
* Make the library modular usable.

* Add missing modular build.jam. And fix gitignore that caused it to be originally deleted!

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add missing import-search for cconfig/predef checks.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.
2024-08-20 15:03:19 +02:00
Mateusz Łoskot
27826a7d55 ci: Remove C++11 build jobs after C++14 switch (#698)
* build: test/Jamfile now check for cxx14_constepxr

Closes #696
2022-06-27 22:45:24 +02:00
Marco Langer
bfed3de004 refactor: Deprecate apply_operation in favor of variant2::visit for any_image (#656)
build: Add /bigobj to MSVC flags

Avoid test\extension\dynamic_image\algorithm\copy_and_convert_pixels.cpp
compilation error:

fatal error C1128: number of sections exceeded object file format limit: compile with /bigobj

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
2022-06-26 13:21:18 +02:00
Mateusz Łoskot
cf1e6b11ba build: Define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING for MSVC 2022-04-09 11:49:50 +02:00
Mateusz Łoskot
58804ecb24 Remove <cxxflags> and other cruft from Jamfile (#557)
The warnings, debug-symbols and other build properties
can (and should) be controlled via b2 command line options.

By the way, most of <cxxflags> uses in Jamfile-s are usually incorrect.
Instead, better option is to:
  use warnings=pedantic to control the warnings instead of cxxflags options directly
  either in requirements or in default-build,
  depending on whether you want to override it from the command line or not
2021-02-03 00:47:17 +01:00
Mateusz Łoskot
4e0f815f5e build: Remove most of uses of cxxflags from test/Jamfile (#550)
Most uses of cxxflags are wrong.
Use b2 warnings instead, e.g. warnings=pedantic
2021-01-27 07:07:51 +01:00
Mateusz Łoskot
434e78f76b ci: R.I.P. Travis CI - Long live GitHub Actions
Follows:
- https://github.com/boostorg/gil/pull/544

Outstanding tasks:
- https://github.com/boostorg/gil/issues/549
- https://github.com/boostorg/gil/issues/548
2021-01-26 01:05:07 +01:00
Mateusz Łoskot
f641190948 Replace BOOST_TEST with BOOST_TEST_EQ for streamable operands (#472)
Improve utilities sending channels, pixels and other GIL objects to
output stream for logging of test errors.

Fix missing namespace qualification in IO tests.

Comment TARGA test case with FIXME that was accidentally
uncommented in cc64bdd1a4
2020-04-01 01:54:12 +02:00
Mateusz Łoskot
bf709e6613 CI: Avoid huge logs due to compilation warnings (#454)
Remove setting flags specific to CMAKE_CXX_CLANG_TIDY as likely not necessary
- restore if it causes issues.

If CI (Travis CI, AppVeyor, CircleCI) or AGENT_JOBSTATUS (Azure Pipelines)
or GITHUB_ACTIONS (GitHub Actions) environment variable is defined,
then do not set high compiler warning levels.
2020-03-17 10:44:46 +01:00
Mateusz Łoskot
40b0633db1 Fix previous fix for B2 rule generate_self_contained_headers
Fix in d026d50e17 broke
calculation of relative paths to headers.
2020-02-21 20:36:28 +01:00
Mateusz Łoskot
d026d50e17 Fix B2 rule generate_self_contained_headers
Fix handling of root path as headers directory (no sub-path given).
Fix target names for pseud-uniqueness (e.g. avoid two h-point.hpp,
one for concepts, one for implementation, etc.),
2020-02-21 20:09:57 +01:00
Mateusz Łoskot
4ed7701b47 Move tests of extensions inside test/ directory (#302)
Split header tests accordingly i.e. test core headers as part of
core tests, numeric extension headers as part of numeric tests, etc.

It extends the convention of sub-directories already established in
`include/boost/gil` directory. It is sensible to follow it in other
areas of the source tree (i.e. `test/`, `doc/` and `benchmark/`).

Another important reason to move the tests is to enable removal of
the top-level `Jamfile` with all its definitions of test-specific
requirements.
The top-level `Jamfile` is not advised, especially if it specifies
build requirements like C++ language version.
Those affect non-tests builds e.g. documentation, causing failures
during generation of HTML documentation (leads to missing docs).
2019-05-28 18:58:22 +02:00
Mateusz Łoskot
c6c5336cc0 Value-initialize channel and pixel value members (#273)
Add tests to ensure member values of channel and pixel classes are
determined, zero-initialized.
Fixes #270

Tidy up formatting.
2019-04-01 17:19:22 +01:00
Mateusz Łoskot
715d760be8 Add build-project color missing from test/Jamfile 2019-03-25 20:38:17 +01:00
Mateusz Łoskot
213b55c6ad Add test for iterator concepts (#242) 2019-02-24 18:15:06 +00:00
Mateusz Łoskot
48db4f51a3 Add test for locator concepts (#241) 2019-02-23 11:16:57 +00:00
Mateusz Łoskot
8e7bda62f5 Move GIL's original test suites to test/legacy/ (#239)
Document maintenance rules of `test/legacy/` content.

Motivation to move the `test/legacy/` is to:
* clarify status of those tests
* make it easier to run tests selectively
* separate new/upcoming feature-specific tests
  from those all-in-one tests.

Other changes:
Rename `gil_test_common.hpp` to `unit_test.hpp` to make
it clearer it acts as `boost/test/unit_test.hpp proxy`.
Remove `<include>$(BOOST_ROOT)` from `Jamfile`-s as unnecessary.
2019-02-20 19:03:28 +00:00
Mateusz Łoskot
5f241af90d [ci] Ensure CI builds clone pre-determined super-project branch
Rename custom variant with gil_ prefix.
Do not define project ID from Jamfile-s as unnecessary.
The project ID-s and build features are global resources, easy to clash.

Add recently added test/ subdirectories to build.
2019-02-19 18:21:28 +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
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
1075967712 Move self-contained headers test to test/headers
Modify Boost.Jam script generating tests to support targets per the library
directories/modules.
2018-12-06 22:35:39 +01:00
Mateusz Loskot
53dc1a6949 Add basic tests for point<T> (#156) 2018-10-20 16:35:29 +02:00
Mateusz Łoskot
875136885a Fix conflict with std::fill_n and boost::range::fill_n (Trac 7189)
Add minimal test for the std::fill and boost::array or std::array as
pixel type.
2018-10-12 18:34:28 +02:00
Mateusz Łoskot
9dc67eae1d Add test to verify headers are self-contained
For each header, a translation unit is generated along with
corresponding compile target.
Currently, only boost/gil/*.hpp and boost/gil/io/* headres are included.

On CI services, compile self_contained_headers targets only if
TEST_HEADERS environment variable is set. This is to avoid build
timeouts due to CI services limits.
When running b2 locally, the tests are compiled by default.
2018-10-05 18:11:08 +02:00
Mateusz Łoskot
ecc19de7c9 Simplify and clean up Jamfiles
Rename Jamfile.v2 to Jamfile - BBV1 is dead.
Remove numeric/test/test.cpp as redundant.
2018-09-21 18:02:37 +02:00
Mateusz Łoskot
4500543a74 Add missing template keyword prior to dependent name axis_iterator (Trac 8896)
* Apply patch from https://svn.boost.org/trac10/ticket/8896
* Add compile-time test of RandomAccessNDImageViewConcept
  * Confirms the reported failure (tested with GCC 7.3 and clang 5.0)
  * Verifies correctness of the patch
2018-08-23 16:05:38 +02: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 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
Niklas Angare
acf760719c Take input filename on the command line to test/image.
This enables test runners to copy the file to the target. It also makes
the code that looks for the file in a different path unnecessary since
Boost.Build will pass the proper relative path.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
a37469e3ad Extend GCC and clang cxxflags for detailed warnings
Bump MSVC warning level to W4
Preparing for detailed warnings clean up based on:
https://svn.boost.org/trac10/wiki/Guidelines/WarningsGuidelines
Group compilation flags and defines in common top-level Jamfile
- relies on Boost.Build feature of referring parent Jamfile-s.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
2c1af1d420 Remove unused define BOOST_GIL_NO_IO 2018-06-27 00:02:27 -04:00
Stefan Seefeld
e2c423bb8f Fix file lookup error. 2018-06-27 00:02:27 -04:00
Stefan Seefeld
31879b85cb Stop using boost::test 2018-06-27 00:02:27 -04:00
Vladimir Prus
8140f4b645 Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
Lubomir Bourdev
560f17c1d1 Hooked up GIL regression tests to run from boost/status
Added kth_channel_view (like nth_channel_view but operates on heterogeneous views)


[SVN r37659]
2007-05-10 22:39:02 +00:00
Lubomir Bourdev
bde62ada6b Fixed headers to refer to the Boost license.
[SVN r37610]
2007-05-07 07:33:33 +00:00
Lubomir Bourdev
9311679cb0 Initial version of boost/libs/gil
[SVN r37496]
2007-04-24 01:58:42 +00:00