Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmp_tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Loidolt
cmp_tool
Commits
edee18ea
Commit
edee18ea
authored
3 years ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
adopt build sytem to windows
parent
b62f5556
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!11
decompression/compression for non-imagette data
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/meson.build
+2
-1
2 additions, 1 deletion
lib/meson.build
meson.build
+2
-1
2 additions, 1 deletion
meson.build
test/cmp_tool/cmp_tool_integration_test.py
+9
-2
9 additions, 2 deletions
test/cmp_tool/cmp_tool_integration_test.py
test/meson.build
+1
-1
1 addition, 1 deletion
test/meson.build
with
14 additions
and
5 deletions
lib/meson.build
+
2
−
1
View file @
edee18ea
...
@@ -17,5 +17,6 @@ cmplib_sources = files([
...
@@ -17,5 +17,6 @@ cmplib_sources = files([
cmp_lib
=
static_library
(
'cmp_lib'
,
cmp_lib
=
static_library
(
'cmp_lib'
,
sources
:
cmplib_sources
,
sources
:
cmplib_sources
,
include_directories
:
incdir
,
include_directories
:
incdir
,
c_args
:
[
'-DDEBUGLEVEL=1'
]
c_args
:
[
'-DDEBUGLEVEL=1'
],
install
:
'true'
# linking under windows mingw only works if this is set
)
)
This diff is collapsed.
Click to expand it.
meson.build
+
2
−
1
View file @
edee18ea
...
@@ -4,11 +4,12 @@ project('cmp_tool', 'c',
...
@@ -4,11 +4,12 @@ project('cmp_tool', 'c',
default_options
:
[
'warning_level=3'
,
'c_std=gnu99'
]
default_options
:
[
'warning_level=3'
,
'c_std=gnu99'
]
)
)
if
host_machine
.
system
()
==
'windows'
and
cc
.
get_id
()
==
'gcc'
if
host_machine
.
system
()
==
'windows'
and
meson
.
get_compiler
(
'c'
)
.
get_id
()
==
'gcc'
# by default, MinGW on win32 behaves as if it ignores __attribute__((packed)),
# by default, MinGW on win32 behaves as if it ignores __attribute__((packed)),
# you need to add -mno-ms-bitfields to make it work as expected.
# you need to add -mno-ms-bitfields to make it work as expected.
# See: https://wintermade.it/blog/posts/__attribute__packed-on-windows-is-ignored-with-mingw.html
# See: https://wintermade.it/blog/posts/__attribute__packed-on-windows-is-ignored-with-mingw.html
add_project_arguments
(
'-mno-ms-bitfields'
,
language
:
'c'
)
add_project_arguments
(
'-mno-ms-bitfields'
,
language
:
'c'
)
add_global_link_arguments
(
'-static'
,
language
:
'c'
)
endif
endif
subdir
(
'include'
)
subdir
(
'include'
)
...
...
This diff is collapsed.
Click to expand it.
test/cmp_tool/cmp_tool_integration_test.py
+
9
−
2
View file @
edee18ea
...
@@ -1136,6 +1136,11 @@ def test_model_fiel_erros():
...
@@ -1136,6 +1136,11 @@ def test_model_fiel_erros():
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglong
"
)
"
longlonglonglonglonglonglonglonglonglong
"
)
if
sys
.
platform
==
'
win32
'
or
sys
.
platform
==
'
cygwin
'
:
output_prefix
=
(
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglonglonglonglong
"
"
longlonglonglonglonglonglonglonglonglonglong
"
)
returncode
,
stdout
,
stderr
=
call_cmp_tool
(
returncode
,
stdout
,
stderr
=
call_cmp_tool
(
"
-c
"
+
cfg_file_name
+
"
-d
"
+
data_file_name
+
"
-m
"
+
model_file_name
+
"
-o
"
+
output_prefix
)
"
-c
"
+
cfg_file_name
+
"
-d
"
+
data_file_name
+
"
-m
"
+
model_file_name
+
"
-o
"
+
output_prefix
)
assert
(
returncode
==
EXIT_FAILURE
)
assert
(
returncode
==
EXIT_FAILURE
)
...
@@ -1147,8 +1152,10 @@ def test_model_fiel_erros():
...
@@ -1147,8 +1152,10 @@ def test_model_fiel_erros():
"
Compress data ... DONE
\n
"
+
"
Compress data ... DONE
\n
"
+
"
Write compressed data to file %s.cmp ... DONE
\n
"
%
(
output_prefix
)
+
"
Write compressed data to file %s.cmp ... DONE
\n
"
%
(
output_prefix
)
+
"
Write updated model to file %s_upmodel.dat ... FAILED
\n
"
%
(
output_prefix
))
"
Write updated model to file %s_upmodel.dat ... FAILED
\n
"
%
(
output_prefix
))
if
sys
.
platform
==
'
win32
'
or
sys
.
platform
==
'
cygwin
'
:
assert
(
stderr
==
"
cmp_tool: %s_upmodel.dat: No such file or directory
\n
"
%
(
output_prefix
))
else
:
assert
(
stderr
==
"
cmp_tool: %s_upmodel.dat: File name too long
\n
"
%
(
output_prefix
))
assert
(
stderr
==
"
cmp_tool: %s_upmodel.dat: File name too long
\n
"
%
(
output_prefix
))
#
finally
:
finally
:
del_file
(
data_file_name
)
del_file
(
data_file_name
)
...
...
This diff is collapsed.
Click to expand it.
test/meson.build
+
1
−
1
View file @
edee18ea
...
@@ -32,7 +32,7 @@ endif
...
@@ -32,7 +32,7 @@ endif
subdir
(
'cmp_tool'
)
subdir
(
'cmp_tool'
)
cunit_dep
=
dependency
(
'cunit'
)
cunit_dep
=
dependency
(
'cunit'
,
required
:
false
)
if
cunit_dep
.
found
()
if
cunit_dep
.
found
()
subdir
(
'cmp_icu'
)
subdir
(
'cmp_icu'
)
endif
endif
...
...
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