2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-23 03:42:09 +00:00
Commit Graph

530 Commits

Author SHA1 Message Date
Mateusz Loskot
230158bd66 Fix const on return type not applied to pointee type of typedef (#190)
Replace png_structp and png_infop aliases with regular pointers to
to prevent type qualifiers ignored on function return type.
2018-12-14 08:12:45 +01:00
Mateusz Łoskot
96ae7e28f4 [cmake] Improve headers globbing [ci skip]
Core heades must not be globbed recursively.
2018-12-13 23:11:26 +01:00
Mateusz Łoskot
f300271fa3 [cmake] Add GIL_ENABLE_EXT_* options [ci skip] 2018-12-13 00:57:30 +01:00
Mateusz Łoskot
d2bb35ba85 Redirect clang-tidy output to a file [ci skip] 2018-12-13 00:04:27 +01:00
Mateusz Łoskot
5f94cd18de Update README with added sections and ToC [ci skip]
Basic structure and some paragraphs stolen from
https://github.com/boostorg/beast/ - a great README example.

Fixes #166
2018-12-12 22:11:07 +01:00
Mateusz Łoskot
d9dfc3800c [doc] Update running clang-tidy how-to [ci skip] 2018-12-12 21:20:49 +01:00
Mateusz Łoskot
b5ad3186c8 [cmake] Explain removal of default /W3 flag [ci skip] 2018-12-12 20:47:02 +01:00
Mateusz Loskot
2250b7159c Fix conflicting definitions from io/dynamic_io_new.hpp and toolbox/dynamic_images.hpp (#185)
The problem appears to be due to the same definitions copied from one
part of the library to the other.
The definitions have been shuffled to fix the compilation,
but purely based on searching the code for what is used where,
thus without confidence where those belong by author's intention.

Fixes #183
2018-12-12 17:58:57 +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
e99db3d0c4 [cmake] Tidy up [ci skip] 2018-12-12 14:00:13 +01:00
Mateusz Łoskot
36af17b390 [cmake] Add extensions ot all-in-one headers test
Updates #184
2018-12-11 23:22:19 +01:00
Mateusz Loskot
021e4b9d4c [cmake] Add test with all headers included in one TU (#184) [ci skip]
Rename target test_compile_headers to test_headers_self_contained.
Add target test_headers_all_in_one
- Currently tests headers of core, concepts and io.
2018-12-11 23:17:27 +01:00
Mateusz Loskot
78110fc89c Apply clang-tidy modernize-use-override (#182)
Used clang-tidy 7.0 with the command:

run-clang-tidy.py \
    -header-filter='boost\/gil\/.*'
    -checks='-*,modernize-use-override' -fix
2018-12-10 23:10:22 +01:00
Mateusz Łoskot
9533d5c101 Add -j8 to b2 invocation [ci skip]
Fix typos
2018-12-10 10:51:35 +01:00
Mateusz Loskot
e0288ece9e Apply clang-tidy modernize-use-nullptr (#180)
Used clang-tidy 7.0 with the command:

  run-clang-tidy.py \
      -header-filter='boost\/gil\/.*' \
      -checks='-*,modernize-use-nullptr' -fix

Update CONTRIBUTING.md on how to generate compile command
database and run clang-tidy.
2018-12-10 09:58:37 +01:00
Mateusz Loskot
682a7264da Include missing headers across boost/gil/extension/io (#179)
Missing headers revealed by compilation of self-contained header tests.
2018-12-09 23:40:38 +01:00
Mateusz Loskot
032a4786bb Remove unnecessary extern C around libraw.h include (#178)
Since libraw is C++ library, not C, it is always built as C++ library.
2018-12-09 21:38:59 +01:00
Mateusz Łoskot
41dac11d0a [cmake] Tidy up variable reuse [ci skip] 2018-12-09 16:12:59 +01:00
Mateusz Loskot
057a02ad0a Replace writer<Device,jpeg_tag> where writer_backend<Device,jpeg_tag> expected (#177)
The reference to `writer<Device,jpeg_tag>` is clearly incorrect:
- writer has no members `init_device`, `empty_buffer`, `closed_buffer`
- if use of writer was correct there, it would require
  `#include <boost/gil/extension/io/jpeg/detail/writer.hpp>`, but that
  would impose cyclic-dependency between writer.hpp and writer_backend.hpp.
2018-12-09 15:45:51 +01:00
Mateusz Łoskot
1c7e26ab93 [cmake] Rename target test_all_headers to test_compile_headers [ci skip] 2018-12-09 13:57:11 +01:00
Mateusz Łoskot
77e8a9bed4 Remove sample CMake output from CONTRIBUTING.md [ci skip]
There is little point in displaying it and it changes from time to time.
2018-12-09 12:52:31 +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
8c26143574 Add missing #include <boost/gil/extension/io/*/tags.hpp>
Fixes compilation error about undeclared *_tag.
2018-12-08 22:20:58 +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
b6e8dbbf8f [cmake] Explain Boost regression not supposed to run headers tests [ci skip] 2018-12-08 15:59:04 +01:00
Mateusz Łoskot
ec58e31fa7 [cmake] Rename main to specific name in headers tests [ci skip]
Rename test_headers target to test_all_headers.
Rationalise use of CMake variables.
2018-12-08 12:16:32 +01:00
Mateusz Łoskot
a0b5767392 Add missing #include <boost/gil/extension/io/raw/tags.hpp>
Fixes compilation error about undeclared raw_tag.
2018-12-08 12:10:59 +01:00
Mateusz Łoskot
d017298440 [cmake] Make test/headers directory is redundant or incorrect [ci skip] 2018-12-08 12:00:52 +01:00
Mateusz Łoskot
03bba74b4e Modernize example/CMakeLists.txt [ci skip] 2018-12-08 11:54:56 +01:00
Mateusz Łoskot
9499b9db24 Update CMakeSettings.json to build examples [ci skip] 2018-12-08 11:31:25 +01:00
Mateusz Łoskot
531e671b49 Update example resize.cpp for new GIL IO
The I/O extensions have been entirely rewritten in Boost.GIL released
in Boost 1.68. The examples refactoring is still an ongoing effort.
2018-12-08 11:24:44 +01:00
Mateusz Łoskot
a0010e5233 Remove superfluous space from CMake generator expression [ci skip] 2018-12-08 11:23:14 +01:00
Mateusz Łoskot
2957351f57 Add self-contained header tests to CMake configuration [ci skip]
Similarly to the tests defined in Boost.Build configuration, those do
not run on CI builds or regression builds.
2018-12-08 02:40:45 +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 Loskot
63e2a1a98a Fix compile-time bugs subchroma_image.hpp definions (#164)
Add missing typename in mpl::if_ condition result.
Restore BOOST_CXX14_CONSTEXPR in boost::algorithm::clamp function
- apparently, GCC 5.5.0 does not compile it with C++11 constexpr.
Still not adding subchroma_image.cpp to toolbox test target
input sources due to run-time failure.

Depends on #176
2018-12-07 23:55:13 +01:00
Mateusz Loskot
443eaa5fae Fix compilation of subchroma_image.hpp as self-contained headers (#176)
Rename `Scaling_Factors` to lower-case, as well as its template parameters.
Move `scaling_factors` to namespace `detail` and before it is use.
Fix access to `scaling_factors` members in derived classes.
Add missing `typename`.
Remove superfluous thus incorrect `typename`.
Remove `subchroma_image_view` implicit friends with self
- Fixes template parameter aliasing for Locator and Factors.

Subset of fixes from pending PR #164
2018-12-07 16:00:17 +01:00
Mateusz Łoskot
c1334b60fe Refer to EditorConfig that helps to avoid trailing whitespaces [ci skip]
Following #171 we should keep the code free from trailing whitespaces.
2018-12-07 10:10:54 +01:00
Mateusz Loskot
9e9ed7c239 Add missing #include-s to ensure self-contained headers (#175) 2018-12-07 09:50:52 +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 Łoskot
af4f0ef7f1 Update CONTRIBUTING.md for CMake 3.13 or later [ci skip]
Follows up recent CMake fixes in FindBoost.cmake:
- https://gitlab.kitware.com/cmake/cmake/merge_requests/2568
- https://gitlab.kitware.com/cmake/cmake/merge_requests/2579
2018-12-06 21:03:36 +01:00
Mateusz Loskot
40241a6efb Reformat boost/gil/concepts/*.hpp to limit line length to 90 characters (#173)
Replace `typedef` with using declaration.
Replace complex return type declared for functions with trailing return type and `auto`.
Format complex metaprogramming constructs in clear and readable way.
Remove superfluous `public` access specifier from `struct` inheritance.
Rename ambiguous type aliases.
Make template parameters
- upper-case (if initials e.g. `CS`)
- camel-case if multi-word (e.g. `ColorSpace`).
2018-12-06 19:11:58 +01:00
Samuel Debionne
edcc912ceb Update design_guide.rst (#172)
Follows up #83 that replaced bitsN[s] aliases with C++11 types
2018-12-06 13:41:13 +01:00
Mateusz Loskot
66bb07d02b Trim trailing whitespaces in all source code files (#171)
PowerShell script used to perform the trimming:

Get-ChildItem -Recurse -Include @("*.cpp", "*.hpp") |
  ForEach-Object { (Get-Content $_.FullName)
      | Foreach {$_.TrimEnd()} | Set-Content $_.FullName }
2018-12-05 08:51:33 +01:00
Mateusz Łoskot
42a14c1f4c Fix Sphinx warnig about html_add_permalinks type [ci skip]
WARNING: The config value `html_add_permalinks' has type `bool',
         defaults to `str'.
2018-11-20 19:41:36 +01:00
Mateusz Łoskot
c683fd45b1 Remove Exhale from doc/requirements.txt [ci skip] 2018-11-20 16:09:19 +01:00
Mateusz Łoskot
4bd08aac67 Start doc/README.md document [ci skip]
Add Python pip requirements.txt (preparing for Exhale prototype).
2018-11-20 15:59:01 +01:00
Mateusz Loskot
7b5b01ec14 Split single boost/gil/concepts.hpp into boost/gil/concepts/*.hpp (#169) 2018-11-17 23:36:29 +01:00
Mateusz Łoskot
28df5bc482 Clean up several warnings about unreferenced formal parameters
Add comment to premultiply.hpp:
- FIXME: Is c input paramater not used intentionally?
boost-1.69.0-beta1 boost-1.69.0
2018-10-29 15:26:53 +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