diff options
author | Mateusz Janek <stryku2393@gmail.com> | 2019-04-25 18:51:40 (GMT) |
---|---|---|
committer | Mateusz Janek <stryku2393@gmail.com> | 2019-04-25 18:51:40 (GMT) |
commit | 8d93815d204b4827ff9f1280a73e55861c00f47c (patch) | |
tree | f4750239df90dec60c730463974d93602e225cd7 /Source/cmSourceGroupCommand.cxx | |
parent | 4ccf40e61e02cffb28b549a3de6f4794ea3e3d92 (diff) | |
download | CMake-8d93815d204b4827ff9f1280a73e55861c00f47c.zip CMake-8d93815d204b4827ff9f1280a73e55861c00f47c.tar.gz CMake-8d93815d204b4827ff9f1280a73e55861c00f47c.tar.bz2 |
source_group command ensures that FILES arguments are actually files
Diffstat (limited to 'Source/cmSourceGroupCommand.cxx')
-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; |