From 72a1af29c247cc9dffd86d8449d56a39af3fd6c5 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 29 Aug 2017 11:15:49 -0400 Subject: install: Avoid CMP0054 warning in generated install script This could happen when an install component is called `TEST`. Fixes: #17211 --- Source/cmInstallGenerator.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index 13b588e..3fbb3af 100644 --- a/Source/cmInstallGenerator.cxx +++ b/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"; } -- cgit v0.12