summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-29 15:15:49 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-30 14:33:13 (GMT)
commit72a1af29c247cc9dffd86d8449d56a39af3fd6c5 (patch)
tree4dabd8cfd0170ad74f170e9151a077cab4fdc61d /Source/cmInstallGenerator.cxx
parentfff28e30cd01a88b2e5f67db2aaf4c068f1bfc89 (diff)
downloadCMake-72a1af29c247cc9dffd86d8449d56a39af3fd6c5.zip
CMake-72a1af29c247cc9dffd86d8449d56a39af3fd6c5.tar.gz
CMake-72a1af29c247cc9dffd86d8449d56a39af3fd6c5.tar.bz2
install: Avoid CMP0054 warning in generated install script
This could happen when an install component is called `TEST`. Fixes: #17211
Diffstat (limited to 'Source/cmInstallGenerator.cxx')
-rw-r--r--Source/cmInstallGenerator.cxx4
1 files 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";
}