Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
3a533838
Commit
3a533838
authored
Feb 24, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update MSVC compiler flags with /openmp
parent
81609c80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
runtests.py
runtests.py
+8
-1
No files found.
runtests.py
View file @
3a533838
...
...
@@ -83,6 +83,7 @@ def update_numpy_extension(ext):
ext
.
include_dirs
.
append
(
numpy
.
get_include
())
def
update_openmp_extension
(
ext
):
ext
.
openmp
=
True
language
=
ext
.
language
if
language
==
'cpp'
:
...
...
@@ -96,6 +97,8 @@ def update_openmp_extension(ext):
ext
.
extra_compile_args
.
extend
(
compile_flags
.
split
())
ext
.
extra_link_args
.
extend
(
link_flags
.
split
())
return
ext
elif
sys
.
platform
==
'win32'
:
return
ext
return
EXCLUDE_EXT
...
...
@@ -110,7 +113,9 @@ def get_openmp_compiler_flags(language):
cc
=
sysconfig
.
get_config_var
(
'CXX'
)
else
:
cc
=
sysconfig
.
get_config_var
(
'CC'
)
if
not
cc
:
return
None
# Windows?
if
not
cc
:
return
None
# Windows?
# For some reason, cc can be e.g. 'gcc -pthread'
cc
=
cc
.
split
()[
0
]
...
...
@@ -254,6 +259,8 @@ class build_ext(_build_ext):
compiler_obj.compiler_so.remove('-Wstrict-prototypes')
if CCACHE:
compiler_obj.compiler_so = CCACHE + compiler_obj.compiler_so
if getattr(ext, 'openmp', None) and compiler_obj.compiler_type == 'msvc':
ext.extra_compile_args.append('/openmp')
except Exception:
pass
_build_ext.build_extension(self, ext)
...
...
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