forked from qt-creator/qt-creator
CMake: Make it easier to get the expanded value of a CMake configuration
Change-Id: If289c48ef4ec2815e8bd12e08b990d1dc809c524 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
|
||||
#include "cmakeconfigitem.h"
|
||||
|
||||
#include <projectexplorer/kit.h>
|
||||
|
||||
#include <utils/macroexpander.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QString>
|
||||
@@ -60,6 +63,11 @@ QByteArray CMakeConfigItem::valueOf(const QByteArray &key, const QList<CMakeConf
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
QString CMakeConfigItem::expandedValue(const ProjectExplorer::Kit *k) const
|
||||
{
|
||||
return k->macroExpander()->expand(QString::fromUtf8(value));
|
||||
}
|
||||
|
||||
std::function<bool (const CMakeConfigItem &a, const CMakeConfigItem &b)> CMakeConfigItem::sortOperator()
|
||||
{
|
||||
return [](const CMakeConfigItem &a, const CMakeConfigItem &b) { return a.key < b.key; };
|
||||
|
||||
Reference in New Issue
Block a user