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

Projucer: Added PCH support for Xcode and Visual Studio exporters

This commit is contained in:
ed 2020-08-25 08:51:13 +01:00
parent 58652ce490
commit d677fd6264
18 changed files with 459 additions and 186 deletions

View file

@ -87,7 +87,10 @@ public:
virtual bool isOSX() const = 0;
virtual bool isiOS() const = 0;
virtual String getDescription() { return {}; }
virtual String getNewLineString() const = 0;
virtual String getDescription() { return {}; }
virtual bool supportsPrecompiledHeaders() const { return false; }
//==============================================================================
// cross-platform audio plug-ins supported by exporter
@ -246,7 +249,12 @@ public:
String getLibrarySearchPathString() const { return librarySearchPathValue.get(); }
StringArray getLibrarySearchPaths() const;
String getGCCLibraryPathFlags() const;
String getPrecompiledHeaderFilename() const { return "JucePrecompiledHeader_" + getName(); }
static String getSkipPrecompiledHeaderDefine() { return "JUCE_SKIP_PRECOMPILED_HEADER"; }
bool shouldUsePrecompiledHeaderFile() const { return usePrecompiledHeaderFileValue.get(); }
String getPrecompiledHeaderFileContent() const;
//==============================================================================
Value getValue (const Identifier& nm) { return config.getPropertyAsValue (nm, getUndoManager()); }
@ -267,7 +275,8 @@ public:
protected:
ValueWithDefault isDebugValue, configNameValue, targetNameValue, targetBinaryPathValue, recommendedWarningsValue, optimisationLevelValue,
linkTimeOptimisationValue, ppDefinesValue, headerSearchPathValue, librarySearchPathValue, userNotesValue;
linkTimeOptimisationValue, ppDefinesValue, headerSearchPathValue, librarySearchPathValue, userNotesValue,
usePrecompiledHeaderFileValue, precompiledHeaderFileValue;
private:
std::map<String, StringArray> recommendedCompilerWarningFlags;
@ -349,6 +358,16 @@ public:
gccOfast = 6
};
bool isPCHEnabledForAnyConfigurations() const
{
if (supportsPrecompiledHeaders())
for (ConstConfigIterator config (*this); config.next();)
if (config->shouldUsePrecompiledHeaderFile())
return true;
return false;
}
protected:
//==============================================================================
String name;