Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
d1bafb5a
Commit
d1bafb5a
authored
Aug 21, 2015
by
Ehsan Azarnasab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify passing cmake yes and no options.
parent
34e73a6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
25 deletions
+12
-25
setup.py
setup.py
+12
-25
No files found.
setup.py
View file @
d1bafb5a
...
@@ -12,15 +12,10 @@ To repackage the previously built package as wheel (bypassing build):
...
@@ -12,15 +12,10 @@ To repackage the previously built package as wheel (bypassing build):
python setup.py bdist_wheel --repackage
python setup.py bdist_wheel --repackage
To install a develop version (egg with symbolic link):
To install a develop version (egg with symbolic link):
python setup.py develop
python setup.py develop
To exclude/include certain features in the build:
To exclude/include certain options in the cmake config use --yes and --no:
--no-gui-support: sets DLIB_NO_GUI_SUPPORT
for example:
--enable-stack-trace: sets DLIB_ENABLE_STACK_TRACE
--yes DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=yes
--enable-asserts: sets DLIB_ENABLE_ASSERTS
--no DLIB_NO_GUI_SUPPORT: will set -DDLIB_NO_GUI_SUPPORT=no
--no-blas: unsets DLIB_USE_BLAS
--no-lapack: unsets DLIB_USE_LAPACK
--no-libpng: unsets DLIB_LINK_WITH_LIBPNG
--no-libjpeg: unsets DLIB_LINK_WITH_LIBJPEG
--no-sqlite3: unsets DLIB_LINK_WITH_SQLITE3
Additional options:
Additional options:
--debug: makes a debug build
--debug: makes a debug build
--cmake: path to specific cmake executable
--cmake: path to specific cmake executable
...
@@ -73,6 +68,10 @@ def _get_options():
...
@@ -73,6 +68,10 @@ def _get_options():
for
opt_idx
,
arg
in
enumerate
(
sys
.
argv
):
for
opt_idx
,
arg
in
enumerate
(
sys
.
argv
):
if
opt_key
==
'cmake'
:
if
opt_key
==
'cmake'
:
_cmake_path
=
arg
_cmake_path
=
arg
elif
opt_key
==
'yes'
:
_cmake_extra
.
append
(
'-D{arg}=yes'
.
format
(
arg
=
arg
.
trim
()))
elif
opt_key
==
'no'
:
_cmake_extra
.
append
(
'-D{arg}=no'
.
format
(
arg
=
arg
.
trim
()))
if
opt_key
:
if
opt_key
:
sys
.
argv
.
remove
(
arg
)
sys
.
argv
.
remove
(
arg
)
...
@@ -88,6 +87,10 @@ def _get_options():
...
@@ -88,6 +87,10 @@ def _get_options():
opt_key
=
opt
opt_key
=
opt
sys
.
argv
.
remove
(
arg
)
sys
.
argv
.
remove
(
arg
)
continue
continue
elif
opt
in
[
'yes'
,
'no'
]:
opt_key
=
opt
sys
.
argv
.
remove
(
arg
)
continue
opt_key
=
None
opt_key
=
None
custom_arg
=
True
custom_arg
=
True
...
@@ -95,22 +98,6 @@ def _get_options():
...
@@ -95,22 +98,6 @@ def _get_options():
_cmake_config
=
'Debug'
_cmake_config
=
'Debug'
elif
opt
==
'release'
:
elif
opt
==
'release'
:
_cmake_config
=
'Release'
_cmake_config
=
'Release'
elif
opt
==
'no-gui-support'
:
_cmake_extra
.
append
(
'-DDLIB_NO_GUI_SUPPORT=yes'
)
elif
opt
==
'enable-stack-trace'
:
_cmake_extra
.
append
(
'-DDLIB_ENABLE_STACK_TRACE=yes'
)
elif
opt
==
'enable-asserts'
:
_cmake_extra
.
append
(
'-DDLIB_ENABLE_ASSERTS=yes'
)
elif
opt
==
'no-blas'
:
_cmake_extra
.
append
(
'-DDLIB_USE_BLAS=no'
)
elif
opt
==
'no-lapack'
:
_cmake_extra
.
append
(
'-DDLIB_USE_LAPACK=no'
)
elif
opt
==
'no-libpng'
:
_cmake_extra
.
append
(
'-DDLIB_LINK_WITH_LIBPNG=no'
)
elif
opt
==
'no-libjpeg'
:
_cmake_extra
.
append
(
'-DDLIB_LINK_WITH_LIBJPEG=no'
)
elif
opt
==
'no-sqlite3'
:
_cmake_extra
.
append
(
'-DDLIB_LINK_WITH_SQLITE3=no'
)
elif
opt
in
[
'debug'
,
'release'
,
elif
opt
in
[
'debug'
,
'release'
,
'repackage'
]:
'repackage'
]:
_options
.
append
(
opt
)
_options
.
append
(
opt
)
...
...
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