mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
VS: Add support for generator expressions to VS_CONFIGURATION_TYPE
Generator expressions in target property VS_CONFIGURATION_TYPE might be used to set the ConfigurationType to Utility for certain configurations to not build the target while still linking to the target in other configurations. Fixes: #19613
This commit is contained in:
@@ -1115,7 +1115,10 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues(Elem& e0)
|
||||
std::string configType;
|
||||
if (const char* vsConfigurationType =
|
||||
this->GeneratorTarget->GetProperty("VS_CONFIGURATION_TYPE")) {
|
||||
configType = vsConfigurationType;
|
||||
cmGeneratorExpression ge;
|
||||
std::unique_ptr<cmCompiledGeneratorExpression> cge =
|
||||
ge.Parse(vsConfigurationType);
|
||||
configType = cge->Evaluate(this->LocalGenerator, c);
|
||||
} else {
|
||||
switch (this->GeneratorTarget->GetType()) {
|
||||
case cmStateEnums::SHARED_LIBRARY:
|
||||
|
||||
Reference in New Issue
Block a user