diff options
author | Stephen Kelly <steveire@gmail.com> | 2016-10-07 18:13:37 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2016-10-07 20:07:50 (GMT) |
commit | 4079ba20d9d9c8d15fd28d9440d56c907dda811c (patch) | |
tree | 35207f17f3cbcfde8aca7a82f93e5d2805e89d0c /Source/cmLinkLibrariesCommand.cxx | |
parent | 17ab8e33f005aab3e493ac4535f63b6f229aacab (diff) | |
download | CMake-4079ba20d9d9c8d15fd28d9440d56c907dda811c.zip CMake-4079ba20d9d9c8d15fd28d9440d56c907dda811c.tar.gz CMake-4079ba20d9d9c8d15fd28d9440d56c907dda811c.tar.bz2 |
cmMakefile: Implement LinkLibraries as an internal property
cmMakefile should not have logic particular to individual cmake
commands. The link_libraries() command is generally obsolete in favor
of target_link_libraries(). An alternative language for CMake probably
would not offer the former. The quirks and historical behaviors of the
current language should be separate from the core classes of CMake to
allow replacing the language.
Diffstat (limited to 'Source/cmLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmLinkLibrariesCommand.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx index 3fc7bd9..4202cf5 100644 --- a/Source/cmLinkLibrariesCommand.cxx +++ b/Source/cmLinkLibrariesCommand.cxx @@ -20,7 +20,7 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args, "a library"); return false; } - this->Makefile->AddLinkLibrary(*i, DEBUG_LibraryType); + this->Makefile->AppendProperty("LINK_LIBRARIES", "debug"); } else if (*i == "optimized") { ++i; if (i == args.end()) { @@ -28,10 +28,9 @@ bool cmLinkLibrariesCommand::InitialPass(std::vector<std::string> const& args, "a library"); return false; } - this->Makefile->AddLinkLibrary(*i, OPTIMIZED_LibraryType); - } else { - this->Makefile->AddLinkLibrary(*i, GENERAL_LibraryType); + this->Makefile->AppendProperty("LINK_LIBRARIES", "optimized"); } + this->Makefile->AppendProperty("LINK_LIBRARIES", i->c_str()); } return true; |