forked from qt-creator/qt-creator
CMake: Turn CMakeConfigItem into a CMake argument
Add a method to turn a CMakeConfigItem into a string suitable to be passed to CMake. Change-Id: Ia7834f1c2fad387dd6e6eaa3863f93385d48ca71 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -245,6 +245,11 @@ QString CMakeConfigItem::toString(const Utils::MacroExpander *expander) const
|
||||
return QString::fromUtf8(key) + QLatin1Char(':') + typeStr + QLatin1Char('=') + expandedValue;
|
||||
}
|
||||
|
||||
QString CMakeConfigItem::toArgument(const Utils::MacroExpander *expander) const
|
||||
{
|
||||
return "-D" + toString(expander);
|
||||
}
|
||||
|
||||
bool CMakeConfigItem::operator==(const CMakeConfigItem &o) const
|
||||
{
|
||||
// type, isAdvanced and documentation do not matter for a match!
|
||||
|
||||
Reference in New Issue
Block a user