mirror of https://github.com/FWGS/hlsdk-xash3d
wscript: Use better check for tgmath.h.
This commit is contained in:
parent
e03f5e3c3e
commit
e976cf2de4
7
wscript
7
wscript
|
@ -200,7 +200,12 @@ def configure(conf):
|
||||||
|
|
||||||
# check if we can use C99 tgmath
|
# check if we can use C99 tgmath
|
||||||
if conf.check_cc(header_name='tgmath.h', mandatory=False):
|
if conf.check_cc(header_name='tgmath.h', mandatory=False):
|
||||||
conf.env.define('HAVE_TGMATH_H', 1)
|
tgmath_usable = conf.check_cc(fragment='''#include<tgmath.h>
|
||||||
|
int main(void){ return (int)sin(2.0f); }''',
|
||||||
|
msg='Checking if tgmath.h is usable', mandatory=False):
|
||||||
|
conf.define_cond('HAVE_TGMATH_H', tgmath_usable)
|
||||||
|
else:
|
||||||
|
conf.undefine('HAVE_TGMATH_H')
|
||||||
|
|
||||||
if conf.env.COMPILER_CC == 'msvc':
|
if conf.env.COMPILER_CC == 'msvc':
|
||||||
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
|
conf.define('_CRT_SECURE_NO_WARNINGS', 1)
|
||||||
|
|
Loading…
Reference in New Issue