forked from qt-creator/qt-creator
CMakePM: Expand macros in cmakeExecutable CMake preset value
The specification allows this, so we need to support it. Task-number: QTCREATORBUG-29643 Change-Id: I8bd0a91ba05d2ed27b7a7af2d268539de020826f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -658,6 +658,11 @@ QList<void *> CMakeProjectImporter::examineDirectory(const FilePath &importPath,
|
||||
const CMakeTool *cmakeTool = CMakeToolManager::defaultCMakeTool();
|
||||
if (cmakeTool)
|
||||
configurePreset.cmakeExecutable = cmakeTool->cmakeExecutable().toString();
|
||||
} else {
|
||||
QString cmakeExecutable = configurePreset.cmakeExecutable.value();
|
||||
CMakePresets::Macros::expand(configurePreset, env, projectDirectory(), cmakeExecutable);
|
||||
|
||||
configurePreset.cmakeExecutable = FilePath::fromUserInput(cmakeExecutable).path();
|
||||
}
|
||||
|
||||
data->cmakeBinary = Utils::FilePath::fromString(configurePreset.cmakeExecutable.value());
|
||||
|
||||
Reference in New Issue
Block a user