diff options
author | Brad King <brad.king@kitware.com> | 2007-12-21 15:04:06 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-12-21 15:04:06 -0500 |
commit | 3cf3bb664aa9b6c447c90c33cd6b5c1dff8c1a10 (patch) | |
tree | a392ebf61b0938354d5a73979a452102ff5eef7c /Source/cmGlobalVisualStudio71Generator.cxx | |
parent | d2be142e3bd2b1347a5bce0c75740b3b2e7acd94 (diff) | |
download | cmake-3cf3bb664aa9b6c447c90c33cd6b5c1dff8c1a10.tar.gz |
ENH: Make static library targets depend on targets to which they "link" for the purpose of build ordering. This makes the build order consistent for static and shared library builds. It is also useful when custom command inputs of one library are generated as custom commands outputs of another. It may be useful in the future for Fortran module dependencies. Implemented for Makefiles, Xcode, and VS 8 and above. Added sample code to do it for VS 7.1 and below, but left it disabled with comments explaining why. Likely it will never be needed on VS 7.1 or below anyway.
Diffstat (limited to 'Source/cmGlobalVisualStudio71Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio71Generator.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index 345cfdf550..adb3f5752f 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -317,8 +317,14 @@ cmGlobalVisualStudio71Generator const char* dspname, const char*, cmTarget& target) { - // insert Begin Project Dependency Project_Dep_Name project stuff here - if (target.GetType() != cmTarget::STATIC_LIBRARY) + // Create inter-target dependencies in the solution file. For VS + // 7.1 and below we cannot let static libraries depend directly on + // targets to which they "link" because the librarian tool will copy + // the targets into the static library. See + // cmGlobalVisualStudioGenerator::FixUtilityDependsForTarget for a + // work-around. VS 8 and above do not have this problem. + if (!this->VSLinksDependencies() || + target.GetType() != cmTarget::STATIC_LIBRARY) { cmTarget::LinkLibraryVectorType::const_iterator j, jend; j = target.GetLinkLibraries().begin(); |