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
e4691051
Commit
e4691051
authored
Aug 23, 2015
by
Ehsan Azarnasab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use Python's architecture to give cmake a clue to generate the right config
parent
8e2ec4cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
setup.py
setup.py
+8
-1
No files found.
setup.py
View file @
e4691051
...
...
@@ -326,6 +326,13 @@ class build(_build):
platform_arch
=
platform
.
architecture
()[
0
]
log
.
info
(
"Detected Python architecture:
%
s"
%
platform_arch
)
# make sure build artifacts are generated for the version of Python currently running
cmake_extra_arch
=
[]
if
platform_arch
==
'64bit'
:
cmake_extra_arch
=
[
'-DCMAKE_SIZEOF_VOID_P=8'
]
elif
platform_arch
==
'32bit'
:
cmake_extra_arch
=
[
'-DCMAKE_SIZEOF_VOID_P=4'
]
build_dir
=
os
.
path
.
join
(
script_dir
,
"./tools/python/build"
)
if
os
.
path
.
exists
(
build_dir
):
log
.
info
(
'Removing build directory
%
s'
%
build_dir
)
...
...
@@ -342,7 +349,7 @@ class build(_build):
cmake_cmd
=
[
cmake_path
,
".."
,
]
+
cmake_extra
]
+
cmake_extra
+
cmake_extra_arch
if
run_process
(
cmake_cmd
):
raise
DistutilsSetupError
(
"cmake configuration failed!"
)
...
...
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