Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blurhash
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
blurhash
Commits
f19a1ea7
Verified
Commit
f19a1ea7
authored
2 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Make benchmark and examples optional + fix windows compilation
parent
853e3b80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
blurhash2bmp.cpp
+2
-2
2 additions, 2 deletions
blurhash2bmp.cpp
meson.build
+8
-4
8 additions, 4 deletions
meson.build
meson_options.txt
+2
-0
2 additions, 0 deletions
meson_options.txt
with
12 additions
and
6 deletions
blurhash2bmp.cpp
+
2
−
2
View file @
f19a1ea7
...
...
@@ -18,12 +18,12 @@ main(int argc, char **argv)
int
height
=
0
,
width
=
0
;
std
::
string_view
width_str
{
argv
[
2
]},
height_str
{
argv
[
3
]};
std
::
from_chars
(
height_str
.
begin
(),
height_str
.
end
(),
height
);
std
::
from_chars
(
height_str
.
data
(),
height_str
.
data
()
+
height_str
.
size
(),
height
);
if
(
height
<=
0
)
{
std
::
cerr
<<
"Invalid height."
;
return
-
2
;
}
std
::
from_chars
(
width_str
.
begin
(),
width_str
.
end
(),
width
);
std
::
from_chars
(
width_str
.
data
(),
width_str
.
data
()
+
width_str
.
size
(),
width
);
if
(
width
<=
0
)
{
std
::
cerr
<<
"Invalid width."
;
return
-
2
;
...
...
This diff is collapsed.
Click to expand it.
meson.build
+
8
−
4
View file @
f19a1ea7
...
...
@@ -18,11 +18,15 @@ if get_option('tests')
test
(
'blurhash-tests'
,
tests
)
endif
bench
=
executable
(
'blurhash-decode-bench'
,
'blurhash-decode-bench.cpp'
,
link_with
:
lib
,
install
:
false
)
benchmark
(
'blurhash-decode-bench'
,
bench
,
timeout
:
60
,
should_fail
:
true
)
if
get_option
(
'benchmarks'
)
bench
=
executable
(
'blurhash-decode-bench'
,
'blurhash-decode-bench.cpp'
,
link_with
:
lib
,
install
:
false
)
benchmark
(
'blurhash-decode-bench'
,
bench
,
timeout
:
60
,
should_fail
:
true
)
endif
executable
(
'blurhash2bmp'
,
'blurhash2bmp.cpp'
,
link_with
:
lib
,
install
:
true
)
executable
(
'blurhash'
,
'image2blurhash.cpp'
,
link_with
:
lib
,
install
:
true
)
if
get_option
(
'examples'
)
executable
(
'blurhash2bmp'
,
'blurhash2bmp.cpp'
,
link_with
:
lib
,
install
:
true
)
executable
(
'blurhash'
,
'image2blurhash.cpp'
,
link_with
:
lib
,
install
:
true
)
endif
install_headers
(
'blurhash.hpp'
)
...
...
This diff is collapsed.
Click to expand it.
meson_options.txt
+
2
−
0
View file @
f19a1ea7
option
(
'tests'
,
type
:
'boolean'
,
value
:
false
,
description
:
'Build the tests'
)
option
(
'examples'
,
type
:
'boolean'
,
value
:
false
,
description
:
'Build the examples'
)
option
(
'benchmarks'
,
type
:
'boolean'
,
value
:
false
,
description
:
'Build the benchmarks'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment