Merge topic 'install-case-sensitive-mac'

a41557a install: Fix FILES_MATCHING on case-sensitive Mac filesystems (#13177)
This commit is contained in:
David Cole 2012-06-14 16:28:54 -04:00 committed by CMake Topic Stage
commit 2d1c25d179
1 changed files with 4 additions and 2 deletions

View File

@ -1003,7 +1003,9 @@ protected:
// Match rules are case-insensitive on some platforms. // Match rules are case-insensitive on some platforms.
#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) #if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__)
std::string lower = cmSystemTools::LowerCase(file); std::string lower = cmSystemTools::LowerCase(file);
file = lower.c_str(); const char* file_to_match = lower.c_str();
#else
const char* file_to_match = file;
#endif #endif
// Collect properties from all matching rules. // Collect properties from all matching rules.
@ -1012,7 +1014,7 @@ protected:
for(std::vector<MatchRule>::iterator mr = this->MatchRules.begin(); for(std::vector<MatchRule>::iterator mr = this->MatchRules.begin();
mr != this->MatchRules.end(); ++mr) mr != this->MatchRules.end(); ++mr)
{ {
if(mr->Regex.find(file)) if(mr->Regex.find(file_to_match))
{ {
matched = true; matched = true;
result.Exclude |= mr->Properties.Exclude; result.Exclude |= mr->Properties.Exclude;