diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2018-09-22 12:25:21 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2018-09-25 13:46:56 (GMT) |
commit | 5ca130e22394978814a9e59418529a7a3e1a61bd (patch) | |
tree | 86e885acf97be74ae4a7b3cfb572e67a338aa67a /Source/cmTarget.cxx | |
parent | 1fea56c3bd99be6c7a6bfaa1454ba67e7a04da72 (diff) | |
download | CMake-5ca130e22394978814a9e59418529a7a3e1a61bd.zip CMake-5ca130e22394978814a9e59418529a7a3e1a61bd.tar.gz CMake-5ca130e22394978814a9e59418529a7a3e1a61bd.tar.bz2 |
Refactoring: introduce function to check if a string is a generator expression
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 4e353c7..6cf7c42 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -514,9 +514,7 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs) std::string srcFiles; const char* sep = ""; for (auto filename : srcs) { - const char* src = filename.c_str(); - - if (!(src[0] == '$' && src[1] == '<')) { + if (!cmGeneratorExpression::StartsWithGeneratorExpression(filename)) { if (!filename.empty()) { filename = this->ProcessSourceItemCMP0049(filename); if (filename.empty()) { |