OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef TOOLS_GN_VISUAL_STUDIO_UTILS_H_ |
| 6 #define TOOLS_GN_VISUAL_STUDIO_UTILS_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 // Some compiler options which will be written to project file. We don't need to |
| 11 // specify all options because generated project file is going to be used only |
| 12 // for compilation of single file. For real build ninja files are used. |
| 13 struct CompilerOptions { |
| 14 CompilerOptions(); |
| 15 ~CompilerOptions(); |
| 16 |
| 17 std::string additional_options; |
| 18 std::string buffer_security_check; |
| 19 std::string forced_include_files; |
| 20 std::string disable_specific_warnings; |
| 21 std::string optimization; |
| 22 std::string runtime_library; |
| 23 std::string treat_warning_as_error; |
| 24 std::string warning_level; |
| 25 }; |
| 26 |
| 27 // Generates something which looks like a GUID, but depends only on the name and |
| 28 // seed. This means the same name / seed will always generate the same GUID, so |
| 29 // that projects and solutions which refer to each other can explicitly |
| 30 // determine the GUID to refer to explicitly. It also means that the GUID will |
| 31 // not change when the project for a target is rebuilt. |
| 32 std::string MakeGuid(const std::string& entry_path, const std::string& seed); |
| 33 |
| 34 // Parses |cflag| value and stores it in |options|. |
| 35 void ParseCompilerOption(const std::string& cflag, CompilerOptions* options); |
| 36 |
| 37 #endif // TOOLS_GN_VISUAL_STUDIO_UTILS_H_ |
OLD | NEW |