Fix setup.py for MSVC
This commit is contained in:
committed by
Jacob Alexander
parent
8361fa8597
commit
a7efe4e3f8
@@ -57,11 +57,14 @@ def test_compilation(cfile, compiler=None, **compiler_attrs):
|
||||
lpreargs = ['-m32']
|
||||
else:
|
||||
lpreargs = ['-m64']
|
||||
extra = compiler_attrs.get('extra_compile_args', [])
|
||||
extra += ['--std=c++14']
|
||||
extra_compile_args = compiler_attrs.get('extra_compile_args', [])
|
||||
extra_compile_args += ['--std=c++14']
|
||||
extra_link_args = compiler_attrs.get('extra_link_args', [])
|
||||
if cc.compiler_type == 'msvc':
|
||||
extra_link_args += ['/MANIFEST']
|
||||
|
||||
objs = cc.compile([cfile], extra_preargs=cpreargs, extra_postargs=extra)
|
||||
cc.link_executable(objs, efile, extra_preargs=lpreargs)
|
||||
objs = cc.compile([cfile], extra_preargs=cpreargs, extra_postargs=extra_compile_args)
|
||||
cc.link_executable(objs, efile, extra_preargs=lpreargs, extra_postargs=extra_link_args)
|
||||
return efile
|
||||
|
||||
def compile_and_run(basedir, src, compiler=None, **compiler_attrs):
|
||||
|
||||
Reference in New Issue
Block a user