SCons: msvc does not need this /TP option any more after we rename .C => .cpp. Also fix a CXX_GLOBAL_CSTD bug (not quite sure)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19693 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-08-21 16:46:05 +00:00
parent 52fa9e584e
commit b38d22d2e7
2 changed files with 3 additions and 3 deletions

View File

@ -448,11 +448,10 @@ C_COMPILER = env.subst('$CC')
C_CCFLAGS = env.subst('$CCFLAGS').split()
# if we use ms vc, the commands are fine (cl.exe and link.exe)
if use_vc:
# /TP treat all source code as C++
# C4819: The file contains a character that cannot be represented
# in the current code page (number)
# C4996: foo was decleared deprecated
CCFLAGS_required.extend(['/TP', '/EHsc'])
CCFLAGS_required.append('/EHsc')
if mode == 'debug':
CCFLAGS_default.extend(['/wd4819', '/wd4996', '/nologo', '/MDd'])
# the flags are also needed in C mode (for intl lib)

View File

@ -236,7 +236,8 @@ int main()
}
'''
conf.Message('Checking for the use of global cstd... ')
ret = conf.TryLink(check_global_cstd_source, '.c')
# if can not compile, define CXX_GLOBAL_CSTD
ret = not conf.TryLink(check_global_cstd_source, '.c')
conf.Result(ret)
return ret