Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 16.0.1
-
None
Description
CMake allows presets to inherit from multiple other presets. If a variable is set in multiple inherited presets, CMake documentation specifies that the value should be taken from the preset that is closest to the beginning of the list (https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html):
If multiple inherits presets provide conflicting values for the same field, the earlier preset in the inherits array will be preferred.
This does not seem to be the case with Qt Creator. It uses value from the later preset.
I'm attaching a simple test project.
When building preset "should-say-a" with CMake the output is as follows:
% cmake --preset should-say-a -B build % cmake --build build % build/cmake-preset-test Variable is set to: a
After opening the project with Qt Creator and building "should-say-a" preset, the output is:
Variable is set to: b