Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
e8e064e5
Commit
e8e064e5
authored
May 30, 2017
by
Davis King
Browse files
Added --compiler-flags to setup.py so you can pass options directly to gcc.
parent
0ef3b736
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
setup.py
setup.py
+4
-1
No files found.
setup.py
View file @
e8e064e5
...
@@ -23,6 +23,7 @@ To exclude/include certain options in the cmake config use --yes and --no:
...
@@ -23,6 +23,7 @@ To exclude/include certain options in the cmake config use --yes and --no:
--yes DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=yes
--yes DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=yes
--no DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=no
--no DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=no
Additional options:
Additional options:
--compiler-flags: pass flags onto the compiler, e.g. --compiler-flag "-Os -Wall" passes -Os -Wall onto GCC.
--debug: makes a debug build
--debug: makes a debug build
--cmake: path to specific cmake executable
--cmake: path to specific cmake executable
--G or -G: name of a build system generator (equivalent of passing -G "name" to cmake)
--G or -G: name of a build system generator (equivalent of passing -G "name" to cmake)
...
@@ -79,6 +80,8 @@ def _get_options():
...
@@ -79,6 +80,8 @@ def _get_options():
for
opt_idx
,
arg
in
enumerate
(
argv
):
for
opt_idx
,
arg
in
enumerate
(
argv
):
if
opt_key
==
'cmake'
:
if
opt_key
==
'cmake'
:
_cmake_path
=
arg
_cmake_path
=
arg
elif
opt_key
==
'compiler-flags'
:
_cmake_extra
.
append
(
'-DCMAKE_CXX_FLAGS={arg}'
.
format
(
arg
=
arg
.
strip
()))
elif
opt_key
==
'yes'
:
elif
opt_key
==
'yes'
:
_cmake_extra
.
append
(
'-D{arg}=yes'
.
format
(
arg
=
arg
.
strip
()))
_cmake_extra
.
append
(
'-D{arg}=yes'
.
format
(
arg
=
arg
.
strip
()))
elif
opt_key
==
'no'
:
elif
opt_key
==
'no'
:
...
@@ -107,7 +110,7 @@ def _get_options():
...
@@ -107,7 +110,7 @@ def _get_options():
opt_key
=
opt
opt_key
=
opt
sys
.
argv
.
remove
(
arg
)
sys
.
argv
.
remove
(
arg
)
continue
continue
elif
opt
in
[
'yes'
,
'no'
]:
elif
opt
in
[
'yes'
,
'no'
,
'compiler-flags'
]:
opt_key
=
opt
opt_key
=
opt
sys
.
argv
.
remove
(
arg
)
sys
.
argv
.
remove
(
arg
)
continue
continue
...
...
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