Replace boolean implib parameters with enum

Named enumeration values are much clearer at call sites and add more
type safety.
This commit is contained in:
Gregor Jasny
2017-04-19 19:10:09 +02:00
committed by Brad King
parent 44f0d2d991
commit cf320f7cd7
20 changed files with 329 additions and 210 deletions
+6 -3
View File
@@ -200,9 +200,11 @@ void cmExportBuildFileGenerator::SetImportLocationProperty(
prop += suffix;
std::string value;
if (target->IsAppBundleOnApple()) {
value = target->GetFullPath(config, false);
value =
target->GetFullPath(config, cmStateEnums::RuntimeBinaryArtifact);
} else {
value = target->GetFullPath(config, false, true);
value = target->GetFullPath(config,
cmStateEnums::RuntimeBinaryArtifact, true);
}
properties[prop] = value;
}
@@ -212,7 +214,8 @@ void cmExportBuildFileGenerator::SetImportLocationProperty(
mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) {
std::string prop = "IMPORTED_IMPLIB";
prop += suffix;
std::string value = target->GetFullPath(config, true);
std::string value =
target->GetFullPath(config, cmStateEnums::ImportLibraryArtifact);
target->GetImplibGNUtoMS(value, value, "${CMAKE_IMPORT_LIBRARY_SUFFIX}");
properties[prop] = value;
}