summaryrefslogtreecommitdiffstats
path: root/src/msvc_helper.h
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-06-12 06:53:32 (GMT)
committerNico Weber <thakis@chromium.org>2016-04-06 01:08:32 (GMT)
commit3a889126247d31d637c7470554be12f7c1df2ffa (patch)
tree9b66b601fc2b0296f3d1ac95aee6a20c176c0568 /src/msvc_helper.h
parentaea5a4d41ff626f46a06a245f54f1175712470f8 (diff)
downloadNinja-3a889126247d31d637c7470554be12f7c1df2ffa.zip
Ninja-3a889126247d31d637c7470554be12f7c1df2ffa.tar.gz
Ninja-3a889126247d31d637c7470554be12f7c1df2ffa.tar.bz2
Make deps=msvc experimentally available on non-Windows.
This makes it possible to run most of the clparser tests on non-Windows, and is potentially useful for cross-compiling on non-Windows hosts. Also, the manual didn't document this as Windows-only previously. If you use this on non-Windows, please let me know, else I might undo this change again in the future.
Diffstat (limited to 'src/msvc_helper.h')
-rw-r--r--src/msvc_helper.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/msvc_helper.h b/src/msvc_helper.h
index 30f87f3..70d1fff 100644
--- a/src/msvc_helper.h
+++ b/src/msvc_helper.h
@@ -13,42 +13,10 @@
// limitations under the License.
#include <string>
-#include <set>
-#include <vector>
using namespace std;
string EscapeForDepfile(const string& path);
-/// Visual Studio's cl.exe requires some massaging to work with Ninja;
-/// for example, it emits include information on stderr in a funny
-/// format when building with /showIncludes. This class parses this
-/// output.
-struct CLParser {
- /// Parse a line of cl.exe output and extract /showIncludes info.
- /// If a dependency is extracted, returns a nonempty string.
- /// Exposed for testing.
- static string FilterShowIncludes(const string& line,
- const string& deps_prefix);
-
- /// Return true if a mentioned include file is a system path.
- /// Filtering these out reduces dependency information considerably.
- static bool IsSystemInclude(string path);
-
- /// Parse a line of cl.exe output and return true if it looks like
- /// it's printing an input filename. This is a heuristic but it appears
- /// to be the best we can do.
- /// Exposed for testing.
- static bool FilterInputFilename(string line);
-
- /// Parse the full output of cl, filling filtered_output with the text that
- /// should be printed (if any). Returns true on success, or false with err
- /// filled. output must not be the same object as filtered_object.
- bool Parse(const string& output, const string& deps_prefix,
- string* filtered_output, string* err);
-
- set<string> includes_;
-};
-
/// Wraps a synchronous execution of a CL subprocess.
struct CLWrapper {
CLWrapper() : env_block_(NULL) {}