[Cmake-commits] CMake branch, master, updated. v3.12.0-rc2-171-ged75309
Kitware Robot
kwrobot at kitware.com
Mon Jul 9 07:35:08 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via ed75309344efe28eeb931fd537853ed8030db0a1 (commit)
via 8a6107650e60b0ca2b9dfdad4b86d1b2f57bbfd7 (commit)
from 0100e5b2a73deedc4c82ad1925a2ab39d5d63960 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed75309344efe28eeb931fd537853ed8030db0a1
commit ed75309344efe28eeb931fd537853ed8030db0a1
Merge: 0100e5b 8a61076
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 9 11:33:28 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jul 9 07:33:35 2018 -0400
Merge topic 'csharp-link-file'
8a6107650e VS: Only link cs files when they're not in binary dir
Acked-by: Kitware Robot <kwrobot at kitware.com>
Acked-by: Michael Stürmer <michael.stuermer at schaeffler.com>
Merge-request: !2177
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a6107650e60b0ca2b9dfdad4b86d1b2f57bbfd7
commit 8a6107650e60b0ca2b9dfdad4b86d1b2f57bbfd7
Author: Robert Dailey <robert at ziosk.com>
AuthorDate: Fri Jun 29 15:30:59 2018 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 6 09:45:15 2018 -0400
VS: Only link cs files when they're not in binary dir
When `*.cs` files are provided, do not generate a `<Link>` element in
the `.csproj` project if those files are descendants of
`CMAKE_CURRENT_BINARY_DIR`. This comparison happens for each file.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index b9ec301..eff915b 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -4523,14 +4523,17 @@ void cmVisualStudio10TargetGenerator::WriteCSharpSourceProperties(
void cmVisualStudio10TargetGenerator::GetCSharpSourceLink(
cmSourceFile const* sf, std::string& link)
{
- std::string f = sf->GetFullPath();
- if (!this->InSourceBuild) {
+ std::string const& sourceFilePath = sf->GetFullPath();
+ std::string const& binaryDir = LocalGenerator->GetCurrentBinaryDirectory();
+
+ if (!cmSystemTools::IsSubDirectory(sourceFilePath, binaryDir)) {
const std::string stripFromPath =
this->Makefile->GetCurrentSourceDirectory();
- if (f.find(stripFromPath) != std::string::npos) {
- link = f.substr(stripFromPath.length() + 1);
+ if (sourceFilePath.find(stripFromPath) == 0) {
if (const char* l = sf->GetProperty("VS_CSHARP_Link")) {
link = l;
+ } else {
+ link = sourceFilePath.substr(stripFromPath.length() + 1);
}
ConvertToWindowsSlash(link);
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list