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