1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Added an option to set the debug information format for each build configuration to the VS exporter

This commit is contained in:
ed 2017-10-13 17:49:52 +01:00
parent 8666f1fc4b
commit f9d5f0eff5
3 changed files with 50 additions and 5 deletions

View file

@ -160,6 +160,7 @@ public:
setValueIfVoid (shouldGenerateManifestValue(), true);
setValueIfVoid (getArchitectureType(), get64BitArchName());
setValueIfVoid (getDebugInformationFormatValue(), isDebug() ? "ProgramDatabase" : "None");
if (! isDebug())
updateOldLTOSetting();
@ -203,6 +204,9 @@ public:
String get64BitArchName() const { return "x64"; }
String get32BitArchName() const { return "Win32"; }
Value getDebugInformationFormatValue() { return getValue (Ids::debugInformationFormat); }
String getDebugInformationFormatString() const { return config [Ids::debugInformationFormat]; }
String createMSVCConfigName() const
{
return getName() + "|" + (config [Ids::winArchitecture] == get64BitArchName() ? "x64" : "Win32");
@ -227,6 +231,21 @@ public:
StringArray (archTypes, numElementsInArray (archTypes)),
Array<var> (archTypes, numElementsInArray (archTypes))));
{
static const char* debugInfoOptions[] = { "None", "C7 Compatible (/Z7)", "Program Database (/Zi)", "Program Database for Edit And Continue (/ZI)", nullptr };
static const char* debugInfoValues[] = { "None", "OldStyle", "ProgramDatabase", "EditAndContinue", nullptr };
props.add (new ChoicePropertyComponentWithEnablement (getDebugInformationFormatValue(),
isDebug() ? isDebugValue() : shouldGenerateDebugSymbolsValue(),
"Debug Information Format",
StringArray (debugInfoOptions),
Array<var> (debugInfoValues)),
"The type of debugging information created for your program for this configuration."
" This will only be used in a debug configuration with no optimisation or a release configuration"
" with forced generation of debug symbols.");
}
props.add (new BooleanPropertyComponent (getFastMathValue(), "Relax IEEE compliance", "Enabled"),
"Enable this to use FAST_MATH non-IEEE mode. (Warning: this can have unexpected results!)");
@ -477,13 +496,11 @@ public:
cl->createNewChildElement ("Optimization")->addTextElement (getOptimisationLevelString (config.getOptimisationLevelInt()));
if (isDebug && config.getOptimisationLevelInt() <= optimisationOff)
if ((isDebug || config.shouldGenerateDebugSymbols())
&& config.getOptimisationLevelInt() <= optimisationOff)
{
isUsingEditAndContinue = ! config.is64Bit();
cl->createNewChildElement ("DebugInformationFormat")
->addTextElement (isUsingEditAndContinue ? "EditAndContinue"
: "ProgramDatabase");
->addTextElement (config.getDebugInformationFormatString());
}
StringArray includePaths (getOwner().getHeaderSearchPaths (config));

View file

@ -124,6 +124,7 @@ namespace Ids
DECLARE_ID (windowsCodeBlocksArchitecture);
DECLARE_ID (toolset);
DECLARE_ID (windowsTargetPlatformVersion);
DECLARE_ID (debugInformationFormat);
DECLARE_ID (IPPLibrary);
DECLARE_ID (msvcModuleDefinitionFile);
DECLARE_ID (bigIcon);

View file

@ -268,3 +268,30 @@ private:
setEnabled (v.getValue());
}
};
//==============================================================================
class ChoicePropertyComponentWithEnablement : public ChoicePropertyComponent,
private Value::Listener
{
public:
ChoicePropertyComponentWithEnablement (const Value& valueToControl,
const Value& valueToListenTo,
const String& propertyName,
const StringArray& choices,
const Array<var>& correspondingValues)
: ChoicePropertyComponent (valueToControl, propertyName,
choices, correspondingValues),
value (valueToListenTo)
{
value.addListener (this);
setEnabled (value.getValue());
}
private:
Value value;
void valueChanged (Value& v) override
{
setEnabled (v.getValue());
}
};