Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Core Modules
dune-common
Commits
37a1f6ad
Commit
37a1f6ad
authored
3 years ago
by
Robert K
Committed by
Andreas Dedner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[feature][cmakebuilder] Added flag console_nocmake to disable cmake
output to console.
parent
6a95fe94
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!960
refactor the way python is used in dune
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/generator/cmakebuilder.py
+8
-2
8 additions, 2 deletions
python/dune/generator/cmakebuilder.py
with
8 additions
and
2 deletions
python/dune/generator/cmakebuilder.py
+
8
−
2
View file @
37a1f6ad
...
...
@@ -117,12 +117,17 @@ class Builder:
def
__init__
(
self
,
force
=
False
,
saveOutput
=
False
):
self
.
force
=
force
self
.
skipTargetAll
=
False
if
saveOutput
is
True
or
saveOutput
.
lower
()
==
"
write
"
:
self
.
savedOutput
=
[
open
(
"
generatorCompiler.out
"
,
"
w+
"
),
open
(
"
generatorCompiler.err
"
,
"
w+
"
)]
elif
saveOutput
.
lower
()
==
"
append
"
:
self
.
savedOutput
=
[
open
(
"
generatorCompiler.out
"
,
"
a+
"
),
open
(
"
generatorCompiler.err
"
,
"
a+
"
)]
elif
saveOutput
.
lower
()
==
"
console
"
or
saveOutput
.
lower
()
==
"
terminal
"
:
elif
saveOutput
.
lower
()
==
"
console
"
or
\
saveOutput
.
lower
()
==
"
terminal
"
or
\
saveOutput
.
lower
()
==
"
console_nocmake
"
:
self
.
savedOutput
=
[
sys
.
stdout
,
sys
.
stderr
]
if
saveOutput
.
lower
()
==
"
console_nocmake
"
:
self
.
skipTargetAll
=
True
else
:
self
.
savedOutput
=
None
self
.
dune_py_dir
=
dune
.
common
.
module
.
get_dune_py_dir
()
...
...
@@ -170,7 +175,8 @@ class Builder:
logger
.
debug
(
"
Compiler output:
"
+
buffer_to_str
(
stdout
))
if
cmake
.
returncode
>
0
:
raise
CompileError
(
buffer_to_str
(
stderr
))
if
self
.
savedOutput
is
not
None
:
writeOutput
=
self
.
savedOutput
is
not
None
and
target
!=
'
all
'
if
self
.
skipTargetAll
else
self
.
savedOutput
is
not
None
if
writeOutput
:
out
=
buffer_to_str
(
stdout
)
nlines
=
out
.
count
(
'
\n
'
)
if
nlines
>
1
:
...
...
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