|
|
@@ -3,6 +3,7 @@
|
|
|
#include "cmLocalGenerator.h"
|
|
|
|
|
|
#include <algorithm>
|
|
|
+#include <array>
|
|
|
#include <cassert>
|
|
|
#include <cstdio>
|
|
|
#include <cstdlib>
|
|
|
@@ -2474,8 +2475,10 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
|
|
target->GetSourceFiles(sources, config);
|
|
|
|
|
|
const std::string configUpper = cmSystemTools::UpperCase(config);
|
|
|
+ static const std::array<std::string, 4> langs = { { "C", "CXX", "OBJC",
|
|
|
+ "OBJCXX" } };
|
|
|
|
|
|
- for (const std::string& lang : { "C", "CXX", "OBJC", "OBJCXX" }) {
|
|
|
+ for (const std::string& lang : langs) {
|
|
|
auto langSources = std::count_if(
|
|
|
sources.begin(), sources.end(), [lang](cmSourceFile* sf) {
|
|
|
return lang == sf->GetLanguage() &&
|