Set simplecpp std option
This commit is contained in:
parent
659a03e754
commit
3a7979171c
|
@ -645,22 +645,11 @@ static simplecpp::DUI createDUI(const Settings &mSettings, const std::string &cf
|
||||||
dui.defines.push_back(s);
|
dui.defines.push_back(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Path::isCPP(filename)) {
|
|
||||||
if (mSettings.standards.cpp == Standards::CPP11)
|
|
||||||
dui.defines.emplace_back("__cplusplus=201103L");
|
|
||||||
else if (mSettings.standards.cpp == Standards::CPP14)
|
|
||||||
dui.defines.emplace_back("__cplusplus=201402L");
|
|
||||||
else if (mSettings.standards.cpp == Standards::CPP17)
|
|
||||||
dui.defines.emplace_back("__cplusplus=201703L");
|
|
||||||
else if (mSettings.standards.cpp == Standards::CPP20)
|
|
||||||
dui.defines.emplace_back("__cplusplus=202002L");
|
|
||||||
else
|
|
||||||
dui.defines.emplace_back("__cplusplus");
|
|
||||||
}
|
|
||||||
|
|
||||||
dui.undefined = mSettings.userUndefs; // -U
|
dui.undefined = mSettings.userUndefs; // -U
|
||||||
dui.includePaths = mSettings.includePaths; // -I
|
dui.includePaths = mSettings.includePaths; // -I
|
||||||
dui.includes = mSettings.userIncludes; // --include
|
dui.includes = mSettings.userIncludes; // --include
|
||||||
|
if (Path::isCPP(filename))
|
||||||
|
dui.std = mSettings.standards.getCPP();
|
||||||
return dui;
|
return dui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue