Ticket #9137: TOOLS - Add analysis build configuration.patch
File TOOLS - Add analysis build configuration.patch, 23.2 KB (added by , 15 years ago) |
---|
-
tools/create_project/create_project.cpp
# HG changeset patch # Parent 899cc75a29a44b6aae92faee0a7304a352970dc4 TOOLS: Add analysis build configuration to create_project diff -r 899cc75a29a4 tools/create_project/create_project.cpp
a b 380 380 // 4996 ('function': was declared deprecated) 381 381 // disabling it removes all the non-standard unsafe functions warnings (strcpy_s, etc.) 382 382 // 383 // 6211 (Leaking memory <pointer> due to an exception. Consider using a local catch block to clean up memory) 384 // we disable exceptions 385 // 386 // 6204 (possible buffer overrun in call to <function>: use of unchecked parameter <variable>) 387 // 6385 (invalid data: accessing <buffer name>, the readable size is <size1> bytes, but <size2> bytes may be read) 388 // 6386 (buffer overrun: accessing <buffer name>, the writable size is <size1> bytes, but <size2> bytes may be written) 389 // give way too many false positives 390 // 383 391 //////////////////////////////////////////////////////////////////////////// 384 392 // 385 393 // 4189 (local variable is initialized but not referenced) … … 397 405 // 398 406 //////////////////////////////////////////////////////////////////////////// 399 407 400 SET_GLOBAL_WARNINGS("4068", "4100", "4103", "4127", "4244", "4250", "4310", "4351", "4512", "4702", "4706", "4800", "4996" );408 SET_GLOBAL_WARNINGS("4068", "4100", "4103", "4127", "4244", "4250", "4310", "4351", "4512", "4702", "4706", "4800", "4996", "6204", "6211", "6385", "6386"); 401 409 SET_WARNINGS("agi", "4510", "4610"); 402 410 SET_WARNINGS("agos", "4511"); 403 411 SET_WARNINGS("lure", "4189", "4355"); -
tools/create_project/msvc.cpp
diff -r 899cc75a29a4 tools/create_project/msvc.cpp
a b 75 75 solution << "Global\n" 76 76 "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n" 77 77 "\t\tDebug|Win32 = Debug|Win32\n" 78 "\t\tAnalysis|Win32 = Analysis|Win32\n" 78 79 "\t\tRelease|Win32 = Release|Win32\n" 79 "\t\tDebug|x64 = Debug|x64\n" 80 "\t\tDebug|x64 = Debug|x64\n" 81 "\t\tAnalysis|x64 = Analysis|x64\n" 80 82 "\t\tRelease|x64 = Release|x64\n" 81 83 "\tEndGlobalSection\n" 82 84 "\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n"; 83 85 84 86 for (UUIDMap::const_iterator i = _uuidMap.begin(); i != _uuidMap.end(); ++i) { 85 87 solution << "\t\t{" << i->second << "}.Debug|Win32.ActiveCfg = Debug|Win32\n" 86 << "\t\t{" << i->second << "}.Debug|Win32.Build.0 = Debug|Win32\n" 87 << "\t\t{" << i->second << "}.Release|Win32.ActiveCfg = Release|Win32\n" 88 << "\t\t{" << i->second << "}.Release|Win32.Build.0 = Release|Win32\n" 89 << "\t\t{" << i->second << "}.Debug|x64.ActiveCfg = Debug|x64\n" 90 << "\t\t{" << i->second << "}.Debug|x64.Build.0 = Debug|x64\n" 91 << "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n" 92 << "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n"; 88 "\t\t{" << i->second << "}.Debug|Win32.Build.0 = Debug|Win32\n" 89 "\t\t{" << i->second << "}.Analysis|Win32.ActiveCfg = Analysis|Win32\n" 90 "\t\t{" << i->second << "}.Analysis|Win32.Build.0 = Analysis|Win32\n" 91 "\t\t{" << i->second << "}.Release|Win32.ActiveCfg = Release|Win32\n" 92 "\t\t{" << i->second << "}.Release|Win32.Build.0 = Release|Win32\n" 93 "\t\t{" << i->second << "}.Debug|x64.ActiveCfg = Debug|x64\n" 94 "\t\t{" << i->second << "}.Debug|x64.Build.0 = Debug|x64\n" 95 "\t\t{" << i->second << "}.Analysis|x64.ActiveCfg = Analysis|x64\n" 96 "\t\t{" << i->second << "}.Analysis|x64.Build.0 = Analysis|x64\n" 97 "\t\t{" << i->second << "}.Release|x64.ActiveCfg = Release|x64\n" 98 "\t\t{" << i->second << "}.Release|x64.Build.0 = Release|x64\n"; 93 99 } 94 100 95 101 solution << "\tEndGlobalSection\n" … … 104 110 createGlobalProp(setup); 105 111 106 112 // Create the configuration property files (for Debug and Release with 32 and 64bits versions) 107 createBuildProp(setup, true, false); 108 createBuildProp(setup, true, true); 109 createBuildProp(setup, false, false); 110 createBuildProp(setup, false, true); 113 // Note: we use the debug properties for the analysis configuration 114 createBuildProp(setup, true, false, false); 115 createBuildProp(setup, true, true, false); 116 createBuildProp(setup, false, false, false); 117 createBuildProp(setup, false, false, true); 118 createBuildProp(setup, false, true, false); 119 createBuildProp(setup, false, true, true); 111 120 } 112 121 113 122 void MSVCProvider::createGlobalProp(const BuildSetup &setup) { … … 197 206 error("Unsupported version passed to createScummVMSolution"); 198 207 } 199 208 209 #define OUTPUT_CONFIGURATION_SCUMMVM(config, platform, props) { \ 210 project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \ 211 "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" \ 212 "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \ 213 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \ 214 "\t\t\t/>\n" \ 215 "\t\t</Configuration>\n"; \ 216 } 217 218 #define OUTPUT_CONFIGURATION_SCUMMVM_DEBUG(config, platform, props, isWin32) { \ 219 project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \ 220 "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" \ 221 "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" \ 222 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" \ 223 "\t\t\t/>\n" \ 224 "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n" \ 225 "\t\t\t\tCommandLine=\"" << getRevisionToolCommandLine() << "\"\n" \ 226 "\t\t\t/>\n" \ 227 "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n" \ 228 "\t\t\t\tCommandLine=\"" << getCopyDataCommandLine(isWin32) << "\"\n" \ 229 "\t\t\t/>\n" \ 230 "\t\t</Configuration>\n"; \ 231 } 232 233 #define OUTPUT_CONFIGURATION(config, platform, props) { \ 234 project << "\t\t<Configuration Name=\"" << config << "|" << platform << "\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_" << config << props << ".vsprops\">\n" \ 235 "\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n" \ 236 "\t\t</Configuration>\n"; \ 237 } 238 200 239 void VisualStudioProvider::createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir, 201 240 const StringList &includeList, const StringList &excludeList) { 202 241 const std::string projectFile = setup.outputDir + '/' + name + getProjectExtension(); … … 233 272 libraries += ' ' + *i + ".lib"; 234 273 235 274 // Win32 236 project << "\t\t<Configuration Name=\"Debug|Win32\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_Debug.vsprops\">\n" 237 "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" 238 "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" 239 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" 240 "\t\t\t/>\n" 241 "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n" 242 "\t\t\t\tCommandLine=\"" << getRevisionToolCommandLine() << "\"\n" 243 "\t\t\t/>\n" 244 "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n" 245 "\t\t\t\tCommandLine=\"" << getCopyDataCommandLine(true) << "\"\n" 246 "\t\t\t/>\n" 247 "\t\t</Configuration>\n" 248 "\t\t<Configuration Name=\"Release|Win32\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_Release.vsprops\">\n" 249 "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" 250 "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" 251 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" 252 "\t\t\t/>\n" 253 "\t\t</Configuration>\n"; 275 OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "Win32", "", true); 276 OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "Win32", "", true); 277 OUTPUT_CONFIGURATION_SCUMMVM("Release", "Win32", ""); 254 278 255 279 // x64 256 280 // For 'x64' we must disable NASM support. Usually we would need to disable the "nasm" feature for that and 257 281 // re-create the library list, BUT since NASM doesn't link any additional libraries, we can just use the 258 282 // libraries list created for IA-32. If that changes in the future, we need to adjust this part! 259 project << "\t\t<Configuration Name=\"Debug|x64\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_Debug64.vsprops\">\n" 260 "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" 261 "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" 262 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" 263 "\t\t\t/>\n" 264 "\t\t\t<Tool\tName=\"VCPreBuildEventTool\"\n" 265 "\t\t\t\tCommandLine=\"" << getRevisionToolCommandLine() << "\"\n" 266 "\t\t\t/>\n" 267 "\t\t\t<Tool\tName=\"VCPostBuildEventTool\"\n" 268 "\t\t\t\tCommandLine=\"" << getCopyDataCommandLine(false) << "\"\n" 269 "\t\t\t/>\n" 270 "\t\t</Configuration>\n" 271 "\t\t<Configuration Name=\"Release|x64\" ConfigurationType=\"1\" InheritedPropertySheets=\".\\ScummVM_Release64.vsprops\">\n" 272 "\t\t\t<Tool\tName=\"VCCLCompilerTool\" DisableLanguageExtensions=\"false\" />\n" 273 "\t\t\t<Tool\tName=\"VCLinkerTool\" OutputFile=\"$(OutDir)/scummvm.exe\"\n" 274 "\t\t\t\tAdditionalDependencies=\"" << libraries << "\"\n" 275 "\t\t\t/>\n" 276 "\t\t</Configuration>\n"; 283 OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Debug", "x64", "64", true); 284 OUTPUT_CONFIGURATION_SCUMMVM_DEBUG("Analysis", "x64", "64", true); 285 OUTPUT_CONFIGURATION_SCUMMVM("Release", "x64", "64"); 286 277 287 } else { 278 288 std::string warnings = ""; 279 289 if (warningsIterator != _projectWarnings.end()) … … 286 296 toolConfig += (name == "sword25" ? "DisableLanguageExtensions=\"false\" " : ""); 287 297 288 298 // Win32 289 project << "\t\t<Configuration Name=\"Debug|Win32\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Debug.vsprops\">\n" 290 "\t\t\t<Tool Name=\"VCCLCompilerTool\" "<< toolConfig << "/>\n" 291 "\t\t</Configuration>\n" 292 293 "\t\t<Configuration Name=\"Release|Win32\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Release.vsprops\">\n" 294 "\t\t\t<Tool Name=\"VCCLCompilerTool\" " << toolConfig << " />\n" 295 "\t\t</Configuration>\n"; 296 // x64 297 project << "\t\t<Configuration Name=\"Debug|x64\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Debug64.vsprops\">\n" 298 "\t\t\t<Tool Name=\"VCCLCompilerTool\" " << toolConfig << " />\n" 299 "\t\t</Configuration>\n" 300 "\t\t<Configuration Name=\"Release|x64\" ConfigurationType=\"4\" InheritedPropertySheets=\".\\ScummVM_Release64.vsprops\">\n" 301 "\t\t\t<Tool Name=\"VCCLCompilerTool\" " << toolConfig << " />\n" 302 "\t\t</Configuration>\n"; 299 OUTPUT_CONFIGURATION("Debug", "Win32", ""); 300 OUTPUT_CONFIGURATION("Analysis", "Win32", ""); 301 OUTPUT_CONFIGURATION("Release", "Win32", ""); 302 OUTPUT_CONFIGURATION("Debug", "x64", "64"); 303 OUTPUT_CONFIGURATION("Analysis", "x64", "64"); 304 OUTPUT_CONFIGURATION("Release", "x64", "64"); 303 305 } 304 306 305 307 project << "\t</Configurations>\n" … … 386 388 properties.flush(); 387 389 } 388 390 389 void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32 ) {390 const std::string outputType = ( isRelease ? "Release" : "Debug");391 void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) { 392 const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug")); 391 393 const std::string outputBitness = (isWin32 ? "32" : "64"); 392 394 393 395 std::ofstream properties((setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str()); … … 411 413 "\t\tStringPooling=\"true\"\n" 412 414 "\t\tBufferSecurityCheck=\"false\"\n" 413 415 "\t\tDebugInformationFormat=\"0\"\n" 416 "\t\tAdditionalOption=\"" << (enableAnalysis ? "/analyze" : "") << "\"\n" 414 417 "\t/>\n" 415 418 "\t<Tool\n" 416 419 "\t\tName=\"VCLinkerTool\"\n" … … 426 429 "\t\tEnableFunctionLevelLinking=\"true\"\n" 427 430 "\t\tWarnAsError=\"false\"\n" 428 431 "\t\tDebugInformationFormat=\"" << (isWin32 ? "4" : "3") << "\"\n" // For x64 format "4" (Edit and continue) is not supported, thus we default to "3" 432 "\t\tAdditionalOption=\"" << (enableAnalysis ? "/analyze" : "") << "\"\n" 429 433 "\t/>\n" 430 434 "\t<Tool\n" 431 435 "\t\tName=\"VCLinkerTool\"\n" … … 472 476 << indentString << "\t<FileConfiguration Name=\"Debug|Win32\">\n" 473 477 << toolLine 474 478 << indentString << "\t</FileConfiguration>\n" 479 << indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n" 480 << toolLine 481 << indentString << "\t</FileConfiguration>\n" 475 482 << indentString << "\t<FileConfiguration Name=\"Release|Win32\">\n" 476 483 << toolLine 477 484 << indentString << "\t</FileConfiguration>\n" … … 484 491 << indentString << "\t<FileConfiguration Name=\"Debug|Win32\">\n" 485 492 << toolLine 486 493 << indentString << "\t</FileConfiguration>\n" 494 << indentString << "\t<FileConfiguration Name=\"Analysis|Win32\">\n" 495 << toolLine 496 << indentString << "\t</FileConfiguration>\n" 487 497 << indentString << "\t<FileConfiguration Name=\"Release|Win32\">\n" 488 498 << toolLine 489 499 << indentString << "\t</FileConfiguration>\n" 490 << indentString << "\t<FileConfiguration Name=\"Debug|x64\">\n" 491 << toolLine 492 << indentString << "\t</FileConfiguration>\n" 500 << indentString << "\t<FileConfiguration Name=\"Debug|x64\">\n" 501 << toolLine 502 << indentString << "\t</FileConfiguration>\n" 503 << indentString << "\t<FileConfiguration Name=\"Analysis|x64\">\n" 504 << toolLine 505 << indentString << "\t</FileConfiguration>\n" 493 506 << indentString << "\t<FileConfiguration Name=\"Release|x64\">\n" 494 507 << toolLine 495 508 << indentString << "\t</FileConfiguration>\n" … … 559 572 560 573 OUTPUT_CONFIGURATION_MSBUILD("Debug", "Win32"); 561 574 OUTPUT_CONFIGURATION_MSBUILD("Debug", "x64"); 575 OUTPUT_CONFIGURATION_MSBUILD("Analysis", "Win32"); 576 OUTPUT_CONFIGURATION_MSBUILD("Analysis", "x64"); 562 577 OUTPUT_CONFIGURATION_MSBUILD("Release", "Win32"); 563 578 OUTPUT_CONFIGURATION_MSBUILD("Release", "x64"); 564 579 … … 575 590 project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n"; 576 591 577 592 OUTPUT_CONFIGURATION_TYPE_MSBUILD("Release|Win32"); 593 OUTPUT_CONFIGURATION_TYPE_MSBUILD("Analysis|Win32"); 578 594 OUTPUT_CONFIGURATION_TYPE_MSBUILD("Debug|Win32"); 579 595 OUTPUT_CONFIGURATION_TYPE_MSBUILD("Release|x64"); 596 OUTPUT_CONFIGURATION_TYPE_MSBUILD("Analysis|x64"); 580 597 OUTPUT_CONFIGURATION_TYPE_MSBUILD("Debug|x64"); 581 598 582 599 project << "\t<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n" 583 600 "\t<ImportGroup Label=\"ExtensionSettings\">\n" 584 601 "\t</ImportGroup>\n"; 585 602 586 OUTPUT_PROPERTIES_MSBUILD("Release|Win32", "ScummVM_Release.props"); 587 OUTPUT_PROPERTIES_MSBUILD("Debug|Win32", "ScummVM_Debug.props"); 588 OUTPUT_PROPERTIES_MSBUILD("Release|x64", "ScummVM_Release64.props"); 589 OUTPUT_PROPERTIES_MSBUILD("Debug|x64", "ScummVM_Debug64.props"); 603 OUTPUT_PROPERTIES_MSBUILD("Release|Win32", "ScummVM_Release.props"); 604 OUTPUT_PROPERTIES_MSBUILD("Analysis|Win32", "ScummVM_Analysis.props"); 605 OUTPUT_PROPERTIES_MSBUILD("Debug|Win32", "ScummVM_Debug.props"); 606 OUTPUT_PROPERTIES_MSBUILD("Release|x64", "ScummVM_Release64.props"); 607 OUTPUT_PROPERTIES_MSBUILD("Analysis|x64", "ScummVM_Analysis64.props"); 608 OUTPUT_PROPERTIES_MSBUILD("Debug|x64", "ScummVM_Debug64.props"); 590 609 591 610 project << "\t<PropertyGroup Label=\"UserMacros\" />\n"; 592 611 593 // Project-specific settings 594 outputProjectSettings(project, name, setup, false, true); 595 outputProjectSettings(project, name, setup, true, true); 596 outputProjectSettings(project, name, setup, false, false); 597 outputProjectSettings(project, name, setup, true, false); 612 // Project-specific settings (analysis uses debug properties) 613 outputProjectSettings(project, name, setup, false, true, false); 614 outputProjectSettings(project, name, setup, false, true, true); 615 outputProjectSettings(project, name, setup, true, true, false); 616 outputProjectSettings(project, name, setup, false, false, false); 617 outputProjectSettings(project, name, setup, false, false, true); 618 outputProjectSettings(project, name, setup, true, false, false); 598 619 599 620 // Files 600 621 std::string modulePath; … … 692 713 output << "\t</ItemGroup>\n"; 693 714 } 694 715 695 void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32) { 716 void MSBuildProvider::outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) { 717 const std::string configuration = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug")); 718 696 719 // Check for project-specific warnings: 697 720 std::map<std::string, StringList>::iterator warningsIterator = _projectWarnings.find(name); 698 721 … … 705 728 for (StringList::const_iterator i = warningsIterator->second.begin(); i != warningsIterator->second.end(); ++i) 706 729 warnings += *i + ';'; 707 730 708 project << "\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='" << (isRelease ? "Release" : "Debug")<< "|" << (isWin32 ? "Win32" : "x64") << "'\">\n"731 project << "\t<ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='" << configuration << "|" << (isWin32 ? "Win32" : "x64") << "'\">\n" 709 732 "\t\t<ClCompile>\n"; 710 733 711 734 // Compile configuration … … 799 822 properties.flush(); 800 823 } 801 824 802 void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32 ) {803 const std::string outputType = ( isRelease ? "Release" : "Debug");825 void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) { 826 const std::string outputType = (enableAnalysis ? "Analysis" : (isRelease ? "Release" : "Debug")); 804 827 const std::string outputBitness = (isWin32 ? "32" : "64"); 805 828 806 829 std::ofstream properties((setup.outputDir + '/' + "ScummVM_" + outputType + (isWin32 ? "" : "64") + getPropertiesExtension()).c_str()); … … 827 850 "\t\t\t<StringPooling>true</StringPooling>\n" 828 851 "\t\t\t<BufferSecurityCheck>false</BufferSecurityCheck>\n" 829 852 "\t\t\t<DebugInformationFormat></DebugInformationFormat>\n" 853 "\t\t\t<EnablePREfast>" << (enableAnalysis ? "true" : "false") << "</EnablePREfast>\n" 830 854 "\t\t</ClCompile>\n" 831 855 "\t\t<Link>\n" 832 856 "\t\t\t<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>\n" … … 840 864 "\t\t\t<FunctionLevelLinking>true</FunctionLevelLinking>\n" 841 865 "\t\t\t<TreatWarningAsError>false</TreatWarningAsError>\n" 842 866 "\t\t\t<DebugInformationFormat>" << (isWin32 ? "EditAndContinue" : "ProgramDatabase") << "</DebugInformationFormat>\n" // For x64 format Edit and continue is not supported, thus we default to Program Database 867 "\t\t\t<EnablePREfast>" << (enableAnalysis ? "true" : "false") << "</EnablePREfast>\n" 843 868 "\t\t</ClCompile>\n" 844 869 "\t\t<Link>\n" 845 870 "\t\t\t<GenerateDebugInformation>true</GenerateDebugInformation>\n" … … 897 922 projectFile << "\t\t<ClCompile Include=\"" << (*entry).path << "\">\n"; 898 923 OUPUT_OBJECT_FILENAME_MSBUILD("Debug", "Win32", (*entry).prefix) 899 924 OUPUT_OBJECT_FILENAME_MSBUILD("Debug", "x64", (*entry).prefix) 925 OUPUT_OBJECT_FILENAME_MSBUILD("Analysis", "Win32", (*entry).prefix) 926 OUPUT_OBJECT_FILENAME_MSBUILD("Analysis", "x64", (*entry).prefix) 900 927 OUPUT_OBJECT_FILENAME_MSBUILD("Release", "Win32", (*entry).prefix) 901 928 OUPUT_OBJECT_FILENAME_MSBUILD("Release", "x64", (*entry).prefix) 902 929 projectFile << "\t\t</ClCompile>\n"; … … 923 950 "\t\t\t<FileType>Document</FileType>\n"; 924 951 925 952 OUTPUT_NASM_COMMAND_MSBUILD("Debug") 953 OUTPUT_NASM_COMMAND_MSBUILD("Analysis") 926 954 OUTPUT_NASM_COMMAND_MSBUILD("Release") 927 955 928 956 projectFile << "\t\t</CustomBuild>\n"; -
tools/create_project/msvc.h
diff -r 899cc75a29a4 tools/create_project/msvc.h
a b 66 66 * Generates the project properties for debug and release settings. 67 67 * 68 68 * @param setup Description of the desired build setup. 69 * @param isRelease Type of property file 70 * @param isWin32 Bitness of property file 69 * @param isRelease Type of property file 70 * @param isWin32 Bitness of property file 71 * @param enableAnalysis PREfast support 71 72 */ 72 virtual void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32 ) = 0;73 virtual void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis) = 0; 73 74 74 75 /** 75 76 * Get the file extension for property files … … 109 110 110 111 void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix); 111 112 112 void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32 );113 void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis); 113 114 114 115 const char *getProjectExtension(); 115 116 const char *getPropertiesExtension(); … … 124 125 void createProjectFile(const std::string &name, const std::string &uuid, const BuildSetup &setup, const std::string &moduleDir, 125 126 const StringList &includeList, const StringList &excludeList); 126 127 127 void outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32 );128 void outputProjectSettings(std::ofstream &project, const std::string &name, const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis); 128 129 129 130 void writeFileListToProject(const FileNode &dir, std::ofstream &projectFile, const int indentation, 130 131 const StringList &duplicate, const std::string &objPrefix, const std::string &filePrefix); … … 133 134 134 135 void outputGlobalPropFile(std::ofstream &properties, int bits, const StringList &defines, const std::string &prefix); 135 136 136 void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32 );137 void createBuildProp(const BuildSetup &setup, bool isRelease, bool isWin32, bool enableAnalysis); 137 138 138 139 const char *getProjectExtension(); 139 140 const char *getPropertiesExtension();