forked from qt-creator/qt-creator
CMakePM: Proper handling of the extra generator
CMake fails if it has -DCMAKE_GENERATOR:STRING=CodeBlocks - Ninja It expects separate values: -DCMAKE_EXTRA_GENERATOR:STRING=CodeBlocks -DCMAKE_GENERATOR:STRING=Ninja Fixes: QTCREATORBUG-27060 Change-Id: Ia2b5bdc425e569118d689b7223fbef5f953d98a7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -668,11 +668,10 @@ CMakeConfig CMakeGeneratorKitAspect::generatorCMakeConfig(const ProjectExplorer:
|
||||
if (info.generator.isEmpty())
|
||||
return config;
|
||||
|
||||
if (info.extraGenerator.isEmpty())
|
||||
config << CMakeConfigItem("CMAKE_GENERATOR", info.generator.toUtf8());
|
||||
else
|
||||
config << CMakeConfigItem("CMAKE_GENERATOR",
|
||||
(info.extraGenerator + " - " + info.generator).toUtf8());
|
||||
config << CMakeConfigItem("CMAKE_GENERATOR", info.generator.toUtf8());
|
||||
|
||||
if (!info.extraGenerator.isEmpty())
|
||||
config << CMakeConfigItem("CMAKE_EXTRA_GENERATOR", info.extraGenerator.toUtf8());
|
||||
|
||||
if (!info.platform.isEmpty())
|
||||
config << CMakeConfigItem("CMAKE_GENERATOR_PLATFORM", info.platform.toUtf8());
|
||||
|
||||
Reference in New Issue
Block a user