From 403ff55f81250a37007df1ec3207d70e23c652a2 Mon Sep 17 00:00:00 2001 From: wizou Date: Sun, 4 Jul 2010 00:07:59 +0000 Subject: [PATCH] added MSVS_VERSION option to scons command-line to specify which compiler to use git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6110 212acab6-be3b-0410-9dea-997c60f758d6 --- SConstruct | 2 ++ Source/mmap.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index fabd14e2..b84c7ca3 100644 --- a/SConstruct +++ b/SConstruct @@ -151,6 +151,7 @@ opts.Add(('IGNORETESTS', 'A comma-separated list of test files that will be ran opts.Add(('PATH', 'A colon-separated list of system paths instead of the default - TEMPORARY AND MAY DEPRECATE', None)) opts.Add(('TOOLSET', 'A comma-separated list of specific tools used for building instead of the default', None)) opts.Add(BoolVariable('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no')) +opts.Add(EnumVariable('MSVS_VERSION', 'MS Visual C++ version', os.environ.get('MSVS_VERSION'), allowed_values=('6.0', '7.0', '7.1', '8.0', '8.0Exp', '9.0', '9.0Exp', '10.0', '10.0Exp'))) opts.Add(BoolVariable('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc)) opts.Add(PathVariable('APPEND_CPPPATH', 'Additional paths to search for include files', None)) opts.Add(PathVariable('APPEND_LIBPATH', 'Additional paths to search for libraries', None)) @@ -176,6 +177,7 @@ opts.Add(('PREFIX_PLUGINAPI_LIB','Path to install plugin static library to.', No opts.Update(defenv) Help(opts.GenerateHelpText(defenv)) +Tool("msvc")(defenv) # add prefixes defines if 'NSIS_CONFIG_CONST_DATA_PATH' in defenv['NSIS_CPPDEFINES']: diff --git a/Source/mmap.cpp b/Source/mmap.cpp index 787bc6be..0684ba28 100644 --- a/Source/mmap.cpp +++ b/Source/mmap.cpp @@ -17,7 +17,8 @@ #include "mmap.h" #include // for f* #include // for assert -#include "tchar.h" +#include "tchar.h" +#include #ifndef _WIN32 # include // for freebsd # include