From 2c8b5a37aff43838938af359e012280c3e36eb71 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 12 Jan 2013 20:59:23 +0000 Subject: [PATCH] Introjucer: VC option for forcing debug symbols. --- .../Project Saving/jucer_ProjectExport_MSVC.h | 14 ++++++++++---- extras/Introjucer/Source/Utility/jucer_PresetIDs.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h index 2cc7a1c23a..35cde1b54f 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_MSVC.h @@ -139,14 +139,17 @@ protected: setValueIfVoid (shouldGenerateManifestValue(), true); } - Value getWarningLevelValue() { return getValue (Ids::winWarningLevel); } - int getWarningLevel() const { return config [Ids::winWarningLevel]; } + Value getWarningLevelValue() { return getValue (Ids::winWarningLevel); } + int getWarningLevel() const { return config [Ids::winWarningLevel]; } Value getPrebuildCommand() { return getValue (Ids::prebuildCommand); } String getPrebuildCommandString() const { return config [Ids::prebuildCommand]; } Value getPostbuildCommand() { return getValue (Ids::postbuildCommand); } String getPostbuildCommandString() const { return config [Ids::postbuildCommand]; } + Value shouldGenerateDebugSymbolsValue() { return getValue (Ids::alwaysGenerateDebugSymbols); } + bool shouldGenerateDebugSymbols() const { return config [Ids::alwaysGenerateDebugSymbols]; } + Value shouldGenerateManifestValue() { return getValue (Ids::generateManifest); } bool shouldGenerateManifest() const { return config [Ids::generateManifest]; } @@ -191,6 +194,9 @@ protected: StringArray (wpoNames), Array (wpoValues, numElementsInArray (wpoValues)))); } + if (! isDebug()) + props.add (new BooleanPropertyComponent (shouldGenerateDebugSymbolsValue(), "Debug Symbols", "Force generation of debug symbols")); + props.add (new TextPropertyComponent (getPrebuildCommand(), "Pre-build Command", 2048, false)); props.add (new TextPropertyComponent (getPostbuildCommand(), "Post-build Command", 2048, false)); props.add (new BooleanPropertyComponent (shouldGenerateManifestValue(), "Manifest", "Generate Manifest")); @@ -787,7 +793,7 @@ protected: linker->setAttribute ("SuppressStartupBanner", "true"); linker->setAttribute ("IgnoreDefaultLibraryNames", isDebug ? "libcmt.lib, msvcrt.lib" : ""); - linker->setAttribute ("GenerateDebugInformation", isDebug ? "true" : "false"); + linker->setAttribute ("GenerateDebugInformation", (isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false"); linker->setAttribute ("ProgramDatabaseFile", getIntDirFile (config.getOutputFilename (".pdb", true))); linker->setAttribute ("SubSystem", msvcIsWindowsSubsystem ? "2" : "1"); @@ -1191,7 +1197,7 @@ protected: link->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true"); link->createNewChildElement ("IgnoreSpecificDefaultLibraries")->addTextElement (isDebug ? "libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)" : "%(IgnoreSpecificDefaultLibraries)"); - link->createNewChildElement ("GenerateDebugInformation")->addTextElement (isDebug ? "true" : "false"); + link->createNewChildElement ("GenerateDebugInformation")->addTextElement ((isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false"); link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getIntDirFile (config.getOutputFilename (".pdb", true))); link->createNewChildElement ("SubSystem")->addTextElement (msvcIsWindowsSubsystem ? "Windows" : "Console"); diff --git a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h index 501e5e49de..46d68c8e04 100644 --- a/extras/Introjucer/Source/Utility/jucer_PresetIDs.h +++ b/extras/Introjucer/Source/Utility/jucer_PresetIDs.h @@ -60,6 +60,7 @@ namespace Ids DECLARE_ID (projectType); DECLARE_ID (libraryType); DECLARE_ID (isDebug); + DECLARE_ID (alwaysGenerateDebugSymbols); DECLARE_ID (targetName); DECLARE_ID (binaryPath); DECLARE_ID (optimisation);