diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ef3dc1014e..449b0c5871 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3616,13 +3616,13 @@ void cmGeneratorTarget::CheckPropertyCompatibility( const cmComputeLinkInformation::ItemVector& deps = info->GetItems(); std::set emittedBools; - static std::string strBool = "COMPATIBLE_INTERFACE_BOOL"; + static const std::string strBool = "COMPATIBLE_INTERFACE_BOOL"; std::set emittedStrings; - static std::string strString = "COMPATIBLE_INTERFACE_STRING"; + static const std::string strString = "COMPATIBLE_INTERFACE_STRING"; std::set emittedMinNumbers; - static std::string strNumMin = "COMPATIBLE_INTERFACE_NUMBER_MIN"; + static const std::string strNumMin = "COMPATIBLE_INTERFACE_NUMBER_MIN"; std::set emittedMaxNumbers; - static std::string strNumMax = "COMPATIBLE_INTERFACE_NUMBER_MAX"; + static const std::string strNumMax = "COMPATIBLE_INTERFACE_NUMBER_MAX"; for (auto const& dep : deps) { if (!dep.Target) {