diff options
author | David Cole <david.cole@kitware.com> | 2012-06-14 20:28:54 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-06-14 20:28:54 (GMT) |
commit | 2d1c25d179e4bc75d6ce465764f19a11d3024052 (patch) | |
tree | 7f4efb4b038b1f7d29fc237751ceacc7028b7f58 /Source/cmFileCommand.cxx | |
parent | a7ae34a97f315577b444747e32539ce8630b421e (diff) | |
parent | a41557a2c8e92f1720b6a38688275c5afa9cc67b (diff) | |
download | CMake-2d1c25d179e4bc75d6ce465764f19a11d3024052.zip CMake-2d1c25d179e4bc75d6ce465764f19a11d3024052.tar.gz CMake-2d1c25d179e4bc75d6ce465764f19a11d3024052.tar.bz2 |
Merge topic 'install-case-sensitive-mac'
a41557a install: Fix FILES_MATCHING on case-sensitive Mac filesystems (#13177)
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index d69431e..5da5a01 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1003,7 +1003,9 @@ protected: // Match rules are case-insensitive on some platforms. #if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) 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 // Collect properties from all matching rules. @@ -1012,7 +1014,7 @@ protected: for(std::vector<MatchRule>::iterator mr = this->MatchRules.begin(); mr != this->MatchRules.end(); ++mr) { - if(mr->Regex.find(file)) + if(mr->Regex.find(file_to_match)) { matched = true; result.Exclude |= mr->Properties.Exclude; |