Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
f8cfeb39
Commit
f8cfeb39
authored
Aug 22, 2022
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build/python/cmake: add "env" parameter
parent
d5d3982d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
cmake.py
python/build/cmake.py
+10
-3
No files found.
python/build/cmake.py
View file @
f8cfeb39
...
@@ -31,7 +31,7 @@ set(CMAKE_CXX_FLAGS "{toolchain.cxxflags} {toolchain.cppflags}")
...
@@ -31,7 +31,7 @@ set(CMAKE_CXX_FLAGS "{toolchain.cxxflags} {toolchain.cppflags}")
__write_cmake_compiler
(
f
,
'C'
,
toolchain
.
cc
)
__write_cmake_compiler
(
f
,
'C'
,
toolchain
.
cc
)
__write_cmake_compiler
(
f
,
'CXX'
,
toolchain
.
cxx
)
__write_cmake_compiler
(
f
,
'CXX'
,
toolchain
.
cxx
)
def
configure
(
toolchain
,
src
,
build
,
args
=
()):
def
configure
(
toolchain
,
src
,
build
,
args
=
()
,
env
=
None
):
cross_args
=
[]
cross_args
=
[]
if
toolchain
.
is_windows
:
if
toolchain
.
is_windows
:
...
@@ -61,16 +61,23 @@ def configure(toolchain, src, build, args=()):
...
@@ -61,16 +61,23 @@ def configure(toolchain, src, build, args=()):
'-GNinja'
,
'-GNinja'
,
]
+
cross_args
+
args
]
+
cross_args
+
args
if
env
is
None
:
env
=
toolchain
.
env
else
:
env
=
{
**
toolchain
.
env
,
**
env
}
print
(
configure
)
print
(
configure
)
subprocess
.
check_call
(
configure
,
env
=
toolchain
.
env
,
cwd
=
build
)
subprocess
.
check_call
(
configure
,
env
=
env
,
cwd
=
build
)
class
CmakeProject
(
Project
):
class
CmakeProject
(
Project
):
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
def
__init__
(
self
,
url
,
md5
,
installed
,
configure_args
=
[],
windows_configure_args
=
[],
windows_configure_args
=
[],
env
=
None
,
**
kwargs
):
**
kwargs
):
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
Project
.
__init__
(
self
,
url
,
md5
,
installed
,
**
kwargs
)
self
.
configure_args
=
configure_args
self
.
configure_args
=
configure_args
self
.
windows_configure_args
=
windows_configure_args
self
.
windows_configure_args
=
windows_configure_args
self
.
env
=
env
def
configure
(
self
,
toolchain
):
def
configure
(
self
,
toolchain
):
src
=
self
.
unpack
(
toolchain
)
src
=
self
.
unpack
(
toolchain
)
...
@@ -78,7 +85,7 @@ class CmakeProject(Project):
...
@@ -78,7 +85,7 @@ class CmakeProject(Project):
configure_args
=
self
.
configure_args
configure_args
=
self
.
configure_args
if
toolchain
.
is_windows
:
if
toolchain
.
is_windows
:
configure_args
=
configure_args
+
self
.
windows_configure_args
configure_args
=
configure_args
+
self
.
windows_configure_args
configure
(
toolchain
,
src
,
build
,
configure_args
)
configure
(
toolchain
,
src
,
build
,
configure_args
,
self
.
env
)
return
build
return
build
def
_build
(
self
,
toolchain
):
def
_build
(
self
,
toolchain
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment