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

Projucer: Add support for ClangCL toolset on Windows

This commit is contained in:
reuk 2022-09-27 15:08:35 +01:00
parent d6910b232e
commit cca01e7c96
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11

View file

@ -73,11 +73,21 @@ public:
String getWindowsTargetPlatformVersion() const { return targetPlatformVersion.get(); }
//==============================================================================
void addToolsetProperty (PropertyListBuilder& props, const char** names, const var* values, int num)
void addToolsetProperty (PropertyListBuilder& props, std::initializer_list<const char*> valueStrings)
{
props.add (new ChoicePropertyComponent (platformToolsetValue, "Platform Toolset",
StringArray (names, num), { values, num }),
"Specifies the version of the platform toolset that will be used when building this project.");
StringArray names;
Array<var> values;
for (const auto& valueString : valueStrings)
{
names.add (valueString);
values.add (valueString);
}
props.add (new ChoicePropertyComponent (platformToolsetValue, "Platform Toolset", names, values),
"Specifies the version of the platform toolset that will be used when building this project.\n"
"In order to use the ClangCL toolset, you must first install the \"C++ Clang Tools for Windows\" "
"package using the Visual Studio Installer.");
}
void create (const OwnedArray<LibraryModule>&) const override
@ -1820,10 +1830,7 @@ public:
void createExporterProperties (PropertyListBuilder& props) override
{
static const char* toolsetNames[] = { "v140", "v140_xp", "v141", "v141_xp" };
const var toolsets[] = { "v140", "v140_xp", "v141", "v141_xp" };
addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets));
addToolsetProperty (props, { "v140", "v140_xp", "v141", "v141_xp" });
MSVCProjectExporterBase::createExporterProperties (props);
}
@ -1865,10 +1872,7 @@ public:
void createExporterProperties (PropertyListBuilder& props) override
{
static const char* toolsetNames[] = { "v140", "v140_xp", "v141", "v141_xp", "v142" };
const var toolsets[] = { "v140", "v140_xp", "v141", "v141_xp", "v142" };
addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets));
addToolsetProperty (props, { "v140", "v140_xp", "v141", "v141_xp", "v142", "ClangCL" });
MSVCProjectExporterBase::createExporterProperties (props);
}
@ -1910,10 +1914,7 @@ public:
void createExporterProperties (PropertyListBuilder& props) override
{
static const char* toolsetNames[] = { "v140", "v140_xp", "v141", "v141_xp", "v142", "v143" };
const var toolsets[] = { "v140", "v140_xp", "v141", "v141_xp", "v142", "v143" };
addToolsetProperty (props, toolsetNames, toolsets, numElementsInArray (toolsets));
addToolsetProperty (props, { "v140", "v140_xp", "v141", "v141_xp", "v142", "v143", "ClangCL" });
MSVCProjectExporterBase::createExporterProperties (props);
}