Expansion of ${generator} macro not working in preset conditions #2934
Labels
bug
a bug in the product
Feature: presets
suggested
Temporary label for internal tracking for suggested bugs to pick up in spare time.
Milestone
Brief Issue Summary
In order to reuse our company-internal CMake presets I wanted to create a repository with common base presets and leverage the
include
andinherits
capabilities. Since the build presets differ for single-config and multi-config generators (mainly theconfiguration
property), I tried to leverage thecondition
properties to check what the value of${generator}
is. Unfortunately, the evaluation seems to fail and does not match CMake's command line behavior.CMake Tools Diagnostics
Debug Log
No response
Additional Information
Example Presets
CMakePresets.json
Expected Behavior
All presets whose conditions are evaluated to true are displayed.
Actual Behavior
CMake > Select Configure Preset is missing the
dev5
configure preset:CMake > Select Build Preset does not show any of the associated build presets, whether the condition is met or not:
Also when a configure preset is selected for the first time, the first associated build preset is selected automatically even if its condition is not fulfilled and it is not visible in the dropdown:
For reference, these are the presets recognized by CMake:
Other Observations
With other properties such as
environment
the${generator}
macro gets correctly expanded. Also, conditions with other macros such as${hostSystemName}
work as expected. Seedev1-working
.The text was updated successfully, but these errors were encountered: