diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 28095f69b3..317b10f411 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -783,9 +783,6 @@ protected: const String extraFlags (replacePreprocessorTokens (config, getExtraCompilerFlagsString()).trim()); if (extraFlags.isNotEmpty()) compiler->setAttribute ("AdditionalOptions", extraFlags); - - if (config.areWarningsTreatedAsErrors()) - compiler->setAttribute ("TreatWarningAsError", "true"); } createToolElement (xml, "VCManagedResourceCompilerTool"); @@ -1252,6 +1249,9 @@ protected: const String extraFlags (replacePreprocessorTokens (config, getExtraCompilerFlagsString()).trim()); if (extraFlags.isNotEmpty()) cl->createNewChildElement ("AdditionalOptions")->addTextElement (extraFlags + " %(AdditionalOptions)"); + + if (config.areWarningsTreatedAsErrors()) + cl->createNewChildElement ("TreatWarningAsError")->addTextElement ("true"); } {