jcaiuwyo / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

Minor issue with default CXX flags on windows, building with VS2012 #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On my system the default CXX flags (obtained from scons help) are:

default: '/EHsc D_VARIADIC_MAX=10'

If you pass the above to cl, it treats 'D_VARIADIC_MAX=10' as a source file, 
not a preprocessor define, and ignores it as an unrecognized source file

I don't know if it breaks anything (I remember having to add D_VARIADIC_MAX=10 
to increase the maximum tuple length before, so it definitely is needed) 
however the proper syntax would be:

'/EHsc /D_VARIADIC_MAX=10'

Changing this has the desired effect

Original issue reported on code.google.com by argh...@gmail.com on 7 Nov 2013 at 4:03

GoogleCodeExporter commented 9 years ago
Also, when the optimize flag is turned off (e.g. for a debug build)
the cc_flags default is:
"/MD /nologo /Zc:wchar_t /Zc:forScope /D_SCL_SECURE_NO_WARNINGS 
/D_CRT_SECURE_NO_WARNINGS'"

Shouldn't that be /MDd to make a debug dll?

Original comment by argh...@gmail.com on 8 Nov 2013 at 7:31

GoogleCodeExporter commented 9 years ago
Yes, there should be a '/' for the _VARIADIC_MAX macro definition.

You can use /MDd, but that effectively prevents debugging the Python module 
(since you'd have to have a debug build of Python as well), and it doesn't seem 
to provide any useful debugging information in my experience, so I'm inclined 
to leave /MD as the default for all builds.

Original comment by yarmond on 9 Nov 2013 at 3:12

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2573.

Original comment by yarmond on 12 Nov 2013 at 11:44