From 89dfd36b60f5ea2cc96aa0a0381b148e75e4a0c9 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 28 Sep 2015 19:23:58 -0400 Subject: CREATE_PROJECT: Add support for Visual Studio 2015 --- devtools/create_project/create_project.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'devtools/create_project/create_project.cpp') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index e4cb67134a..0611646eab 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -124,7 +124,7 @@ int main(int argc, char *argv[]) { setup.features = getAllFeatures(); ProjectType projectType = kProjectNone; - int msvcVersion = 9; + int msvcVersion = 12; bool useSDL2 = false; // Parse command line arguments @@ -176,7 +176,7 @@ int main(int argc, char *argv[]) { msvcVersion = atoi(argv[++i]); - if (msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11 && msvcVersion != 12) { + if (msvcVersion != 9 && msvcVersion != 10 && msvcVersion != 11 && msvcVersion != 12 && msvcVersion != 14) { std::cerr << "ERROR: Unsupported version: \"" << msvcVersion << "\" passed to \"--msvc-version\"!\n"; return -1; } @@ -453,6 +453,9 @@ int main(int argc, char *argv[]) { // 4250 ('class1' : inherits 'class2::member' via dominance) // two or more members have the same name. Should be harmless // + // 4267 ('var' : conversion from 'size_t' to 'type', possible loss of data) + // throws tons and tons of warnings (no immediate plan to fix all usages) + // // 4310 (cast truncates constant value) // used in some engines // @@ -510,6 +513,7 @@ int main(int argc, char *argv[]) { globalWarnings.push_back("4127"); globalWarnings.push_back("4244"); globalWarnings.push_back("4250"); + globalWarnings.push_back("4267"); globalWarnings.push_back("4310"); globalWarnings.push_back("4345"); globalWarnings.push_back("4351"); @@ -636,6 +640,7 @@ void displayHelp(const char *exe) { " 10 stands for \"Visual Studio 2010\"\n" " 11 stands for \"Visual Studio 2012\"\n" " 12 stands for \"Visual Studio 2013\"\n" + " 14 stands for \"Visual Studio 2015\"\n" " The default is \"9\", thus \"Visual Studio 2008\"\n" " --build-events Run custom build events as part of the build\n" " (default: false)\n" @@ -658,9 +663,9 @@ void displayHelp(const char *exe) { "Optional features settings:\n" " --enable- enable inclusion of the feature \"name\"\n" " --disable- disable inclusion of the feature \"name\"\n" - "\n" - "SDL settings:\n" - " --sdl2 link to SDL 2.0, instead of SDL 1.2\n" + "\n" + "SDL settings:\n" + " --sdl2 link to SDL 2.0, instead of SDL 1.2\n" "\n" " There are the following features available:\n" "\n"; @@ -921,7 +926,7 @@ const Feature s_features[] = { { "libz", "USE_ZLIB", "zlib", true, "zlib (compression) support" }, { "mad", "USE_MAD", "libmad", true, "libmad (MP3) support" }, { "vorbis", "USE_VORBIS", "libvorbisfile_static libvorbis_static libogg_static", true, "Ogg Vorbis support" }, - { "flac", "USE_FLAC", "libFLAC_static", true, "FLAC support" }, + { "flac", "USE_FLAC", "libFLAC_static win_utf8_io_static", true, "FLAC support" }, { "png", "USE_PNG", "libpng", true, "libpng support" }, { "faad", "USE_FAAD", "libfaad", false, "AAC support" }, { "mpeg2", "USE_MPEG2", "libmpeg2", false, "MPEG-2 support" }, @@ -1050,7 +1055,7 @@ bool producesObjectFile(const std::string &fileName) { } std::string toString(int num) { - return static_cast(&(std::ostringstream() << num))->str(); + return static_cast(&(std::ostringstream() << num))->str(); } /** -- cgit v1.2.3 From fbcf667b6a57593a2b85622ad1e1380c8aef7210 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 12 Oct 2015 14:39:28 -0400 Subject: CREATE_PROJECT: Cleanup and turn off exception handling again --- devtools/create_project/create_project.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'devtools/create_project/create_project.cpp') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 0611646eab..0aba511491 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -471,6 +471,8 @@ int main(int argc, char *argv[]) { // 4512 ('class' : assignment operator could not be generated) // some classes use const items and the default assignment operator cannot be generated // + // 4577 ('noexcept' used with no exception handling mode specified) + // // 4702 (unreachable code) // mostly thrown after error() calls (marked as NORETURN) // @@ -513,7 +515,6 @@ int main(int argc, char *argv[]) { globalWarnings.push_back("4127"); globalWarnings.push_back("4244"); globalWarnings.push_back("4250"); - globalWarnings.push_back("4267"); globalWarnings.push_back("4310"); globalWarnings.push_back("4345"); globalWarnings.push_back("4351"); @@ -527,6 +528,11 @@ int main(int argc, char *argv[]) { globalWarnings.push_back("6385"); globalWarnings.push_back("6386"); + if (msvcVersion == 14) { + globalWarnings.push_back("4267"); + globalWarnings.push_back("4577"); + } + projectWarnings["agi"].push_back("4510"); projectWarnings["agi"].push_back("4610"); -- cgit v1.2.3