diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-04-30 14:30:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-30 14:30:35 (GMT) |
commit | 40852eed8e304dffd7254d6790850e0a73766d9e (patch) | |
tree | d5fb730ef28ff0caac1ee8e5a0d50fcd587353e9 /Source | |
parent | d0e6fc28334023a42fbae797ece8c8e8526dc1c3 (diff) | |
parent | 8d93815d204b4827ff9f1280a73e55861c00f47c (diff) | |
download | CMake-40852eed8e304dffd7254d6790850e0a73766d9e.zip CMake-40852eed8e304dffd7254d6790850e0a73766d9e.tar.gz CMake-40852eed8e304dffd7254d6790850e0a73766d9e.tar.bz2 |
Merge topic 'source_group-tree-files'
8d93815d20 source_group command ensures that FILES arguments are actually files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3265
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSourceGroupCommand.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx index 2bc4c39..5cdacaa 100644 --- a/Source/cmSourceGroupCommand.cxx +++ b/Source/cmSourceGroupCommand.cxx @@ -80,7 +80,10 @@ std::vector<std::string> prepareFilesPathsForTree( prepared.reserve(filesPaths.size()); for (auto const& filePath : filesPaths) { - prepared.push_back(prepareFilePathForTree(filePath, currentSourceDir)); + // If provided file path is actually not a file, silently ignore it. + if (cmSystemTools::FileExists(filePath, /*isFile=*/true)) { + prepared.push_back(prepareFilePathForTree(filePath, currentSourceDir)); + } } return prepared; |