Commit Graph

48 Commits

Author SHA1 Message Date
Mateusz Łoskot
84b155630d
Remove include/boost/gil/version.hpp file as unused (#403)
Motivation:

  - GIL is part of Boost collection, so Boost version is sufficient
  - GIL version makes little sense unless GIL becomes independent
  - Two distinct version numbers, Boost's and GIL's, are confusing.
  - Role of GIL's version number is not documented thus not entirely clear

The removal was discussed and agreed upon in this thread
https://lists.boost.org/boost-gil/2019/11/0346.php
2019-11-09 23:09:09 +01:00
Mateusz Łoskot
d583d2b90c
CMake: Require Boost 1.68 as first release of C++11 GIL 2019-10-13 18:09:02 +02:00
Mateusz Łoskot
d7884ee1a6
Fix parameters type of subimage_view functions in core and dynamic_image (#337)
Align with `subsampled_view` overloads accepting `point_t` and `coord_t`
Both types are based on `std::ptrdiff_t`. Fixes compilation warnings.
Tidy up `subimage_view` and `subsampled_view` with trailing return.
Add tests for `subimage_view` in core and dynamic_image extension.
(First tests for the dynamic_image, hurray! :))

Add explicit cast to double in division operator for point<T> to
fix compilation warnings.
2019-07-16 13:05:48 +02:00
Mateusz Łoskot
698d83c60f
[cmake] Build conan package from sources if missing [ci skip] 2019-06-05 23:44:07 +02:00
Mateusz Łoskot
895aa77fb6
[CMake] Remove GIL_DOWNLOAD_FINDBOOST option (#307)
Upcoming CMake 3.15 introduced more dependencies in FindBoost.cmake
what makes the downloading impractical.
2019-06-05 09:19:17 +02: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
992241d88e
[cmake] Boost.System is not direct dependency [ci skip] 2019-05-22 22:11:13 +02:00
Mateusz Łoskot
22baa73c05
[cmake] Allow GIL_USE_CONAN independently from IO ext 2019-05-12 13:43:10 +02:00
Mateusz Łoskot
c11a19880c
[CI] Rationalize deployment of Boost dependencies (#279)
Introduce `get-boost.sh` as Boost downloader for all our CI services.
Closes #276

Credits for `get-boost.sh` idea go to @djarek and @boostorg/beast
2019-04-13 11:51:26 +02:00
Mateusz Łoskot
bcc26fba40
[cmake] Disable Boost autolinking for MSVC (#244) [skip travis]
Test CMAKE_CXX_COMPILER_ID instead of MSVC variable.
2019-02-26 22:08:21 +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
9ed79d93c8
[cmake] Shuffle sections with options and C++ flags [ci skip] 2019-01-04 15:59:19 +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
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 Łoskot
6ce2196f94
[cmake] Find libraw on Unix 2018-12-16 01:31:10 +01:00
Mateusz Łoskot
f300271fa3 [cmake] Add GIL_ENABLE_EXT_* options [ci skip] 2018-12-13 00:57:30 +01:00
Mateusz Łoskot
b5ad3186c8
[cmake] Explain removal of default /W3 flag [ci skip] 2018-12-12 20:47:02 +01:00
Mateusz Łoskot
aff86c252c
[cmake] Add option GIL_USE_CLANG_TIDY (default OFF) [ci skip]
If ON, sets CMAKE_CXX_CLANG_TIDY property on all targets, so CMake will
run build via clang-tidy to perform linting.
2018-12-12 14:04:05 +01:00
Mateusz Łoskot
92cddb3f71
[cmake] Bundle all Boost and IO libraries in gil_dependencies target
Simplify generating of IO tests targets, remove lots of duplicate cruft.
Tidy up CMake scripts.
2018-12-08 23:20:54 +01:00
Mateusz Łoskot
89f54ea203
[cmake] Add workaround for clean MSVC warning level setting [ci skip] 2018-12-08 22:08:40 +01:00
Mateusz Łoskot
b07501a8cc
[cmake] Simplify and clarify -D options [ci skip]
Clean up CMakeLists.txt if-s.
2018-12-08 21:25:27 +01:00
Mateusz Łoskot
a0010e5233 Remove superfluous space from CMake generator expression [ci skip] 2018-12-08 11:23:14 +01:00
Mateusz Łoskot
63c450c2a9
Modernize CMake configuration
Replace global compile options and definitions with interface targets.
Remove globing for headers.
Set project version based on GIL version.
Remove GIL_BUILD_TESTS option as redundant - there is no point in
using CMake for development of header-only library if no tests
are to be built.
2018-12-08 01:05:47 +01:00
Mateusz Łoskot
5fd0f7878c [cmake] Prefix status messages with Boost.GIL for source clarity [ci skip]
Remove GIL_USE_BOOST_STAGE as unnecessary.
Download FindBoost.cmake for <3.13 - this module in CMake 3.13
received some important updates.
2018-10-29 14:01:48 +01:00
Mateusz Łoskot
347f8ad123
[CMake] Improve FindBoost.cmake auto-update procedure [ci skip]
Rename the CMake option, add informative messages to
explain some troubleshooting tricks.
2018-10-19 19:08:33 +02:00
Mateusz Łoskot
ced645c476 Apply minor fixes to CMake configuration [ci skip] 2018-08-23 15:03:42 +02: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
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 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
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
1a9a01ce5d [cmake] Restore downloading of FindBoost.cmake for CMake older than 3.11
Download the module from the latest stable release, not master.
Require Boost 1.67 or later.

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
1e89c764b2 [cmake] Replicate GCC/clang compile flags from Jamfile
Add headers to target sources, so they are included in generate
makefiles, scanned and inspected as regular sources.

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
5737caa039 Require C++11 or later
Add necessary flags to Boost.Build and CMake configurations
as well as CI builds.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
8b5e7b0c82 [cmake] Bump required version to 3.10
Remove downloading FindBoost.cmake as too fragile and
no longer necessary workaround.

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
09c0b08eb2 [cmake] Specify Boost_ADDITIONAL_VERSIONS with 1.67
This is just in a remotely expected case... ;)

[ci skip]
2018-06-27 00:02:27 -04:00
Mateusz Loskot
f34674024c [cmake] Download latest FindBoost.cmake from upstream when using Boost clone
Clone of Boost repository is likely develop branch at version number
not yet released unknown to any released CMake.
Download latest FindBoost.cmake from upstream which has likely been
updated with Boost version of develop.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
a53e0629fd Compile tests with cl.exe -FC to force absolute path in __FILE__ 2018-06-27 00:02:27 -04:00
Mateusz Loskot
b231bd5904 Add CMake option GIL_ENABLE_IO (default=ON)
Allow to enable/disable building of IO tests and examples
which depend on thirdparty libraries (libjpeg,libpng,libtiff).
2018-06-27 00:02:27 -04:00
Mateusz Loskot
fab99207f2 Add basic CMake configuration for Boost.GIL
First stab at collection of CMakeLists.txt for Boost.GIL
  - Allow building and testing boostorg/gil against Boost from
    cloned superproject or installed distribution.
Add CMakeSettings.json config file for VS2017 integration with CMake
  - Defines build configurations for VS and Ninja generators.
  - Can be used as is or as a template ready to customise.
Add conanfile.txt for Conan package manager (eg. for cmake -DGIL_USE_CONAN=ON).
Add .editignore file to with basic encoding of CMake and CI scripts.
Update .appveyor.yml with two extra CMake-based builds (allowed to fail).
2018-06-27 00:02:27 -04:00
Troy D. Straszheim
6c4bc7af41 rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
Troy D. Straszheim
4cc46fd8f6 Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
Troy D. Straszheim
44871518f5 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00