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

Side by Side Diff: tools/gn/path_output.h

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch that compiles and passes unit tests on both Windows and Linux Created 6 years, 1 month 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/output_file.cc ('k') | tools/gn/path_output.cc » ('j') | 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 #ifndef TOOLS_GN_PATH_OUTPUT_H_ 5 #ifndef TOOLS_GN_PATH_OUTPUT_H_
6 #define TOOLS_GN_PATH_OUTPUT_H_ 6 #define TOOLS_GN_PATH_OUTPUT_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <string> 9 #include <string>
10 10
(...skipping 15 matching lines...) Expand all
26 public: 26 public:
27 // Controls whether writing directory names include the trailing slash. 27 // Controls whether writing directory names include the trailing slash.
28 // Often we don't want the trailing slash when writing out to a command line, 28 // Often we don't want the trailing slash when writing out to a command line,
29 // especially on Windows where it's a backslash and might be interpreted as 29 // especially on Windows where it's a backslash and might be interpreted as
30 // escaping the thing following it. 30 // escaping the thing following it.
31 enum DirSlashEnding { 31 enum DirSlashEnding {
32 DIR_INCLUDE_LAST_SLASH, 32 DIR_INCLUDE_LAST_SLASH,
33 DIR_NO_LAST_SLASH, 33 DIR_NO_LAST_SLASH,
34 }; 34 };
35 35
36 PathOutput(const SourceDir& current_dir, EscapingMode escaping); 36 PathOutput(const SourceDir& current_dir, const base::StringPiece& source_root,
37 EscapingMode escaping);
37 ~PathOutput(); 38 ~PathOutput();
38 39
39 // Read-only since inverse_current_dir_ is computed depending on this. 40 // Read-only since inverse_current_dir_ is computed depending on this.
40 EscapingMode escaping_mode() const { return options_.mode; } 41 EscapingMode escaping_mode() const { return options_.mode; }
41 42
42 const SourceDir& current_dir() const { return current_dir_; } 43 const SourceDir& current_dir() const { return current_dir_; }
43 44
44 // Getter/setters for flags inside the escape options. 45 // Getter/setters for flags inside the escape options.
45 bool inhibit_quoting() const { return options_.inhibit_quoting; } 46 bool inhibit_quoting() const { return options_.inhibit_quoting; }
46 void set_inhibit_quoting(bool iq) { options_.inhibit_quoting = iq; } 47 void set_inhibit_quoting(bool iq) { options_.inhibit_quoting = iq; }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 // Uses system slashes if convert_slashes_to_system_. 80 // Uses system slashes if convert_slashes_to_system_.
80 std::string inverse_current_dir_; 81 std::string inverse_current_dir_;
81 82
82 // Since the inverse_current_dir_ depends on some of these, we don't expose 83 // Since the inverse_current_dir_ depends on some of these, we don't expose
83 // this directly to modification. 84 // this directly to modification.
84 EscapeOptions options_; 85 EscapeOptions options_;
85 }; 86 };
86 87
87 #endif // TOOLS_GN_PATH_OUTPUT_H_ 88 #endif // TOOLS_GN_PATH_OUTPUT_H_
OLDNEW
« no previous file with comments | « tools/gn/output_file.cc ('k') | tools/gn/path_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698