فهرست منبع

install: Avoid CMP0054 warning in generated install script

This could happen when an install component is called `TEST`.

Fixes: #17211
Brad King 8 سال پیش
والد
کامیت
72a1af29c2
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      Source/cmInstallGenerator.cxx

+ 2 - 2
Source/cmInstallGenerator.cxx

@@ -131,9 +131,9 @@ void cmInstallGenerator::AddInstallRule(
 std::string cmInstallGenerator::CreateComponentTest(const char* component,
                                                     bool exclude_from_all)
 {
-  std::string result = "\"${CMAKE_INSTALL_COMPONENT}\" STREQUAL \"";
+  std::string result = "\"x${CMAKE_INSTALL_COMPONENT}x\" STREQUAL \"x";
   result += component;
-  result += "\"";
+  result += "x\"";
   if (!exclude_from_all) {
     result += " OR NOT CMAKE_INSTALL_COMPONENT";
   }