[Cmake-commits] CMake branch, next, updated. v2.8.10.2-1432-gc10992c
Brad King
brad.king at kitware.com
Mon Jan 7 13:55:59 EST 2013
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, next has been updated
via c10992c62541e2ae64f57991aad814ee761a3b9b (commit)
via b684b395812872184cbf10e0e0513e2a18546047 (commit)
from fd97a2c77eb6509f70d7b9dd37b6d1e4202a7b52 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c10992c62541e2ae64f57991aad814ee761a3b9b
commit c10992c62541e2ae64f57991aad814ee761a3b9b
Merge: fd97a2c b684b39
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 7 13:55:55 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 7 13:55:55 2013 -0500
Merge topic 'vs11-external-object' into next
b684b39 VS11: Simplify external object file handling (#13831)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b684b395812872184cbf10e0e0513e2a18546047
commit b684b395812872184cbf10e0e0513e2a18546047
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 7 11:31:52 2013 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 7 11:42:53 2013 -0500
VS11: Simplify external object file handling (#13831)
Since commit 9a6ff950 (Fix for bug where VS2010 did not use .obj files as
part of the build, 2011-04-01) and commit b291d9e7 (VS10: Fix external
objects generated outside target, 2012-03-19) we try to detect whether an
external object file is also a custom command output in the same target.
This is because VS10 includes .obj custom command outputs on the link line
by default.
VS 11 supports a "<LinkObjects ...>false</LinkObjects>" setting in custom
command rules to tell VS not to link the outputs. From the VS help:
Specify whether the Inputs and output files with specific extensions (.obj,
.lib, .res, .rsc) are passed to the linker.
Treat all external object files the same and add "<Object>" settings for them.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ec9c125..2596d73 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -572,6 +572,12 @@ cmVisualStudio10TargetGenerator::WriteCustomRule(cmSourceFile* source,
sep = ";";
}
(*this->BuildFileStream ) << "</Outputs>\n";
+ if(this->LocalGenerator->GetVersion() > cmLocalVisualStudioGenerator::VS10)
+ {
+ // VS >= 11 let us turn off linking of custom command outputs.
+ this->WritePlatformConfigTag("LinkObjects", i->c_str(), 3);
+ (*this->BuildFileStream ) << "false</LinkObjects>\n";
+ }
}
this->WriteString("</CustomBuild>\n", 2);
}
@@ -879,14 +885,23 @@ void cmVisualStudio10TargetGenerator::WriteAllSources()
}
}
- for(std::vector<cmSourceFile*>::const_iterator
- si = this->GeneratorTarget->ExternalObjects.begin();
- si != this->GeneratorTarget->ExternalObjects.end(); ++si)
+ if(this->LocalGenerator->GetVersion() > cmLocalVisualStudioGenerator::VS10)
+ {
+ // For VS >= 11 we use LinkObjects to avoid linking custom command
+ // outputs. Use Object for all external objects, generated or not.
+ this->WriteSources("Object", this->GeneratorTarget->ExternalObjects);
+ }
+ else
{
// If an object file is generated in this target, then vs10 will use
// it in the build, and we have to list it as None instead of Object.
- std::vector<cmSourceFile*> const* d = this->Target->GetSourceDepends(*si);
- this->WriteSource((d && !d->empty())? "None":"Object", *si);
+ for(std::vector<cmSourceFile*>::const_iterator
+ si = this->GeneratorTarget->ExternalObjects.begin();
+ si != this->GeneratorTarget->ExternalObjects.end(); ++si)
+ {
+ std::vector<cmSourceFile*> const* d=this->Target->GetSourceDepends(*si);
+ this->WriteSource((d && !d->empty())? "None":"Object", *si);
+ }
}
this->WriteSources("None", this->GeneratorTarget->ExtraSources);
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list