From e4d1d7deedc5745aa10e080d7f4e0f1d9b4d2f4c Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 21 Feb 2015 18:45:33 +0000 Subject: [PATCH] Introjucer: enabled the flag for warnings-as-errors for MSVC 2010 and later. --- .../Source/Project Saving/jucer_ProjectExport_MSVC.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"); } {