forked from qt-creator/qt-creator
CMakePM: Always set the comiplers from the CMake Preset probe
In cases when a CMake project is using a CMake preset with a toolchain file, the CMAKE_C|XX_COMIPLER value was not set in the CMakeCache.txt. This commit makes sure that the cache from the CMake preset probe contains CMAKE_C|XX_COMPILER values. Task-number: QTCREATORBUG-30474 Change-Id: I63ac6fe2b043e49dda98e286b6d85950e34be920 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -245,6 +245,8 @@ static CMakeConfig configurationFromPresetProbe(
|
|||||||
cmakeListTxt.writeFileContents(QByteArray("cmake_minimum_required(VERSION 3.15)\n"
|
cmakeListTxt.writeFileContents(QByteArray("cmake_minimum_required(VERSION 3.15)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"project(preset-probe)\n"
|
"project(preset-probe)\n"
|
||||||
|
"set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\" CACHE FILEPATH \"\" FORCE)\n"
|
||||||
|
"set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\" CACHE FILEPATH \"\" FORCE)\n"
|
||||||
"\n"));
|
"\n"));
|
||||||
|
|
||||||
Process cmake;
|
Process cmake;
|
||||||
|
Reference in New Issue
Block a user