Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: tools/gn/variables.cc

Issue 1887533003: Add an output_dir override to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/variables.h" 5 #include "tools/gn/variables.h"
6 6
7 namespace variables { 7 namespace variables {
8 8
9 // Built-in variables ---------------------------------------------------------- 9 // Built-in variables ----------------------------------------------------------
10 10
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 "\n" 1112 "\n"
1113 " # On Windows, generate a \"mysettings.cpl\" control panel applet.\n" 1113 " # On Windows, generate a \"mysettings.cpl\" control panel applet.\n"
1114 " # Control panel applets are actually special shared libraries.\n" 1114 " # Control panel applets are actually special shared libraries.\n"
1115 " if (is_win) {\n" 1115 " if (is_win) {\n"
1116 " shared_library(\"mysettings\") {\n" 1116 " shared_library(\"mysettings\") {\n"
1117 " output_extension = \"cpl\"\n" 1117 " output_extension = \"cpl\"\n"
1118 " ...\n" 1118 " ...\n"
1119 " }\n" 1119 " }\n"
1120 " }\n"; 1120 " }\n";
1121 1121
1122 const char kOutputDir[] = "output_dir";
1123 const char kOutputDir_HelpShort[] =
1124 "output_dir: [directory] Directory to put output file in.";
1125 const char kOutputDir_Help[] =
1126 "output_dir: [directory] Directory to put output file in.\n"
1127 "\n"
1128 " For library and executable targets, overrides the directory for the\n"
1129 " final output. This must be in the root_build_dir or a child thereof.\n"
1130 "\n"
1131 " This should generally be in the root_out_dir or a subdirectory thereof\n"
1132 " (the root_out_dir will be the same as the root_build_dir for the\n"
1133 " default toolchain, and will be a subdirectory for other toolchains).\n"
1134 " Not putting the output in a subdirectory of root_out_dir can result\n"
1135 " in collisions between different toolchains, so you will need to take\n"
1136 " steps to ensure that your target is only present in one toolchain.\n"
1137 "\n"
1138 " Normally the toolchain specifies the output directory for libraries\n"
1139 " and executables (see \"gn help tool\"). You will have to consult that\n"
1140 " for the default location. The default location will be used if\n"
1141 " output_dir is undefined or empty.\n"
1142 "\n"
1143 "Example\n"
1144 "\n"
1145 " shared_library(\"doom_melon\") {\n"
1146 " output_dir = \"$root_out_dir/plugin_libs\"\n"
1147 " ...\n"
1148 " }\n";
1149
1122 const char kOutputName[] = "output_name"; 1150 const char kOutputName[] = "output_name";
1123 const char kOutputName_HelpShort[] = 1151 const char kOutputName_HelpShort[] =
1124 "output_name: [string] Name for the output file other than the default."; 1152 "output_name: [string] Name for the output file other than the default.";
1125 const char kOutputName_Help[] = 1153 const char kOutputName_Help[] =
1126 "output_name: Define a name for the output file other than the default.\n" 1154 "output_name: Define a name for the output file other than the default.\n"
1127 "\n" 1155 "\n"
1128 " Normally the output name of a target will be based on the target name,\n" 1156 " Normally the output name of a target will be based on the target name,\n"
1129 " so the target \"//foo/bar:bar_unittests\" will generate an output\n" 1157 " so the target \"//foo/bar:bar_unittests\" will generate an output\n"
1130 " file such as \"bar_unittests.exe\" (using Windows as an example).\n" 1158 " file such as \"bar_unittests.exe\" (using Windows as an example).\n"
1131 "\n" 1159 "\n"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 INSERT_VARIABLE(Data) 1657 INSERT_VARIABLE(Data)
1630 INSERT_VARIABLE(DataDeps) 1658 INSERT_VARIABLE(DataDeps)
1631 INSERT_VARIABLE(Defines) 1659 INSERT_VARIABLE(Defines)
1632 INSERT_VARIABLE(Depfile) 1660 INSERT_VARIABLE(Depfile)
1633 INSERT_VARIABLE(Deps) 1661 INSERT_VARIABLE(Deps)
1634 INSERT_VARIABLE(IncludeDirs) 1662 INSERT_VARIABLE(IncludeDirs)
1635 INSERT_VARIABLE(Inputs) 1663 INSERT_VARIABLE(Inputs)
1636 INSERT_VARIABLE(Ldflags) 1664 INSERT_VARIABLE(Ldflags)
1637 INSERT_VARIABLE(Libs) 1665 INSERT_VARIABLE(Libs)
1638 INSERT_VARIABLE(LibDirs) 1666 INSERT_VARIABLE(LibDirs)
1667 INSERT_VARIABLE(OutputDir)
1639 INSERT_VARIABLE(OutputExtension) 1668 INSERT_VARIABLE(OutputExtension)
1640 INSERT_VARIABLE(OutputName) 1669 INSERT_VARIABLE(OutputName)
1641 INSERT_VARIABLE(OutputPrefixOverride) 1670 INSERT_VARIABLE(OutputPrefixOverride)
1642 INSERT_VARIABLE(Outputs) 1671 INSERT_VARIABLE(Outputs)
1643 INSERT_VARIABLE(PrecompiledHeader) 1672 INSERT_VARIABLE(PrecompiledHeader)
1644 INSERT_VARIABLE(PrecompiledSource) 1673 INSERT_VARIABLE(PrecompiledSource)
1645 INSERT_VARIABLE(Public) 1674 INSERT_VARIABLE(Public)
1646 INSERT_VARIABLE(PublicConfigs) 1675 INSERT_VARIABLE(PublicConfigs)
1647 INSERT_VARIABLE(PublicDeps) 1676 INSERT_VARIABLE(PublicDeps)
1648 INSERT_VARIABLE(ResponseFileContents) 1677 INSERT_VARIABLE(ResponseFileContents)
1649 INSERT_VARIABLE(Script) 1678 INSERT_VARIABLE(Script)
1650 INSERT_VARIABLE(Sources) 1679 INSERT_VARIABLE(Sources)
1651 INSERT_VARIABLE(Testonly) 1680 INSERT_VARIABLE(Testonly)
1652 INSERT_VARIABLE(Visibility) 1681 INSERT_VARIABLE(Visibility)
1653 INSERT_VARIABLE(WriteRuntimeDeps) 1682 INSERT_VARIABLE(WriteRuntimeDeps)
1654 } 1683 }
1655 return info_map; 1684 return info_map;
1656 } 1685 }
1657 1686
1658 #undef INSERT_VARIABLE 1687 #undef INSERT_VARIABLE
1659 1688
1660 } // namespace variables 1689 } // namespace variables
OLDNEW
« no previous file with comments | « tools/gn/variables.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698