diff options
author | Brad King <brad.king@kitware.com> | 2009-10-20 16:38:37 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-20 16:38:37 -0400 |
commit | bc43b0f2a4dcecaaf653bb2d8b2bc13b4245f4d6 (patch) | |
tree | a574ad6e61fee1b5b4865812746159359203d0e5 /Source/cmGlobalVisualStudio7Generator.h | |
parent | 8d94703cc2532ea51aef5101462e90ac61e04994 (diff) | |
download | cmake-bc43b0f2a4dcecaaf653bb2d8b2bc13b4245f4d6.tar.gz |
Do not link library dependencies in VS solutions
In VS 8 and greater this commit implements
add_dependencies(myexe mylib) # depend without linking
by adding the
LinkLibraryDependencies="false"
option to project files. Previously the above code would cause myexe to
link to mylib in VS 8 and greater. This option prevents dependencies
specified only in the solution from being linked. We already specify
the real link library dependencies in the project files, and any project
depending on this to link would not have worked in Makefile generators.
We were already avoiding this problem in VS 7.1 and below by inserting
intermediate mylib_UTILITY targets. It was more important for those
versions because if a static library depended on another library the
librarian would copy the dependees into the depender! This is no longer
the case with VS 8 and above so we do not need that workaround.
See issue #9732.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.h')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 363489ef95..85ba24495d 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -92,6 +92,10 @@ public: ///! What is the configurations directory variable called? virtual const char* GetCMakeCFGInitDirectory() { return "$(OutDir)"; } + /** Return true if the target project file should have the option + LinkLibraryDependencies and link to .sln dependencies. */ + virtual bool NeedLinkLibraryDependencies(cmTarget&) { return false; } + protected: virtual const char* GetIDEVersion() { return "7.0"; } |