Ticket #9120: create_msvc_disable_warnings.patch
File create_msvc_disable_warnings.patch, 3.4 KB (added by , 15 years ago) |
---|
-
tools/create_msvc/create_msvc.cpp
90 90 void displayHelp(const char *exe); 91 91 } // End of anonymous namespace 92 92 93 // Map containing a project-specific list of warnings 94 static std::map<std::string, std::string> project_warnings; 95 static std::string global_warnings; 96 93 97 int main(int argc, char *argv[]) { 94 98 #if !(defined(_WIN32) || defined(WIN32)) 95 99 // Initialize random number generator for UUID creation … … 241 245 setup.libraries.push_back("winmm.lib"); 242 246 setup.libraries.push_back("sdl.lib"); 243 247 248 // Initialize global & project-specific warnings 249 global_warnings = "4068;4100;4103;4127;4244;4250;4310;4351;4512;4702;4706;4800;4996"; 250 251 project_warnings["agi"] = "4510;4610"; 252 project_warnings["lure"] = "4189"; 253 244 254 createMSVCProject(setup, msvcVersion); 245 255 } 246 256 … … 841 851 "\t</Platforms>\n" 842 852 "\t<Configurations>\n"; 843 853 854 // Check for project-specific warnings: 855 std::map<std::string, std::string>::iterator warnings = project_warnings.find(name); 856 844 857 if (name == "scummvm") { 845 858 std::string libraries; 846 859 … … 877 890 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" 878 891 "\t\t\t/>\n" 879 892 "\t\t</Configuration>\n"; 893 } else if (warnings != project_warnings.end()) { 894 // Win32 895 project << "\t\t<Configuration Name=\"Debug|Win32\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Debug.vsprops\">\n" 896 "\t\t\t<Tool Name=\"VCCLCompilerTool\" DisableSpecificWarnings=\"" << warnings->second << "\" />\n" 897 "\t\t</Configuration>\n" 898 "\t\t<Configuration Name=\"Release|Win32\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Release.vsprops\">\n" 899 "\t\t\t<Tool Name=\"VCCLCompilerTool\" DisableSpecificWarnings=\"" << warnings->second << "\" />\n" 900 "\t\t</Configuration>\n"; 901 // x64 902 project << "\t\t<Configuration Name=\"Debug|x64\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Debug64.vsprops\">\n" 903 "\t\t\t<Tool Name=\"VCCLCompilerTool\" DisableSpecificWarnings=\"" << warnings->second << "\" />\n" 904 "\t\t</Configuration>\n" 905 "\t\t<Configuration Name=\"Release|x64\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Release64.vsprops\">\n" 906 "\t\t\t<Tool Name=\"VCCLCompilerTool\" DisableSpecificWarnings=\"" << warnings->second << "\" />\n" 907 "\t\t</Configuration>\n"; 880 908 } else if (name == "tinsel") { 881 909 // Win32 882 910 project << "\t\t<Configuration Name=\"Debug|Win32\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Debug.vsprops\">\n" … … 940 968 "\t<Tool\n" 941 969 "\t\tName=\"VCCLCompilerTool\"\n" 942 970 "\t\tDisableLanguageExtensions=\"true\"\n" 943 "\t\tDisableSpecificWarnings=\" 4068;4100;4103;4121;4127;4189;4201;4221;4244;4250;4267;4310;4351;4355;4510;4511;4512;4610;4701;4702;4706;4800;4996\"\n"971 "\t\tDisableSpecificWarnings=\"" << global_warnings << "\"\n" 944 972 "\t\tAdditionalIncludeDirectories=\"" << prefix << ";" << prefix << "\\engines\"\n" 945 973 "\t\tPreprocessorDefinitions=\"" << defines << "\"\n" 946 974 "\t\tExceptionHandling=\"0\"\n"