From: Bo Peng Date: Tue, 21 Aug 2007 16:46:05 +0000 (+0000) Subject: SCons: msvc does not need this /TP option any more after we rename .C => .cpp. Also... X-Git-Tag: 1.6.10~8777 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b38d22d2e7c6c0234d5958485128e3afc639f1c3;p=features.git 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 --- diff --git a/development/scons/SConstruct b/development/scons/SConstruct index 74db7429b7..6639fdda6f 100644 --- a/development/scons/SConstruct +++ b/development/scons/SConstruct @@ -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) diff --git a/development/scons/scons_utils.py b/development/scons/scons_utils.py index 9fa18265c4..4749bf882e 100644 --- a/development/scons/scons_utils.py +++ b/development/scons/scons_utils.py @@ -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