diff options
author | Brad King <brad.king@kitware.com> | 2018-04-13 13:46:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-13 13:46:54 (GMT) |
commit | 0a122393d7cca291e2f695d85b3781593dbd4035 (patch) | |
tree | 501401b5d6324b1321b2d159fc9481dddabcad92 /Source/cmLocalVisualStudio7Generator.cxx | |
parent | 07604a767ddb98b1020b546aa257bd7a965caf0a (diff) | |
parent | 8480c2afc09d3e976e4eff69081f41d812fb35cb (diff) | |
download | CMake-0a122393d7cca291e2f695d85b3781593dbd4035.zip CMake-0a122393d7cca291e2f695d85b3781593dbd4035.tar.gz CMake-0a122393d7cca291e2f695d85b3781593dbd4035.tar.bz2 |
Merge branch 'backport-fix-explicit-CMakeLists.txt'
Diffstat (limited to 'Source/cmLocalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index acb5921..fcdcdc5 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1364,7 +1364,18 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout, for (size_t ci = 0; ci < configs.size(); ++ci) { acs.Configs.push_back(ci); } - sources.Sources.emplace_back(std::move(acs)); + bool haveCMakeLists = false; + for (cmGeneratorTarget::AllConfigSource& si : sources.Sources) { + if (si.Source == sf) { + haveCMakeLists = true; + // Replace the explicit source reference with our generated one. + si = acs; + break; + } + } + if (!haveCMakeLists) { + sources.Sources.emplace_back(std::move(acs)); + } } } |