/src/CMake/Source/cmAddLinkOptionsCommand.cxx
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
3 | | #include "cmAddLinkOptionsCommand.h" |
4 | | |
5 | | #include "cmDiagnostics.h" |
6 | | #include "cmExecutionStatus.h" |
7 | | #include "cmMakefile.h" |
8 | | |
9 | | bool cmAddLinkOptionsCommand(std::vector<std::string> const& args, |
10 | | cmExecutionStatus& status) |
11 | 0 | { |
12 | 0 | cmMakefile& mf = status.GetMakefile(); |
13 | |
|
14 | 0 | mf.IssueDiagnostic(cmDiagnostics::CMD_NON_TARGET_DIRECTIVE, |
15 | 0 | "Use of non-target directives is not recommended. " |
16 | 0 | "Consider target_link_options instead."); |
17 | |
|
18 | 0 | for (std::string const& i : args) { |
19 | 0 | mf.AddLinkOption(i); |
20 | 0 | } |
21 | |
|
22 | 0 | return true; |
23 | 0 | } |