cxxproject 0.5.60 → 0.5.61

Sign up to get free protection for your applications and to get access to all the features.
@@ -332,6 +332,17 @@ module Cxxproject
332
332
  error_descs, console_output_full = error_parser.scan_lines(console_output, @project_dir)
333
333
 
334
334
  console_output = console_output_full if Rake::application.consoleOutput_fullnames
335
+
336
+ if Rake::application.consoleOutput_visualStudio
337
+ console_output_VS = ""
338
+ descCounter = 0
339
+ console_output.each_line do |l|
340
+ d = error_descs[descCounter]
341
+ console_output_VS << error_parser.makeVsError(l, d) << "\n"
342
+ descCounter = descCounter + 1
343
+ end
344
+ console_output = console_output_VS
345
+ end
335
346
 
336
347
  ret = error_descs.any? { |e| e.severity == ErrorParser::SEVERITY_ERROR }
337
348
 
@@ -32,6 +32,18 @@ module Cxxproject
32
32
  raise "Unknown severity: #{str}"
33
33
  end
34
34
  end
35
+
36
+ def inv_severity(s)
37
+ if s == SEVERITY_INFO
38
+ "info"
39
+ elsif s == SEVERITY_WARNING
40
+ "warning"
41
+ elsif s == SEVERITY_ERROR
42
+ "error"
43
+ else
44
+ raise "Unknown severity: #{s}"
45
+ end
46
+ end
35
47
 
36
48
  # scan the output from the console line by line and return a list of ErrorDesc objects.
37
49
  # for none-error/warning lines the description object will indicate that as severity 255
@@ -44,7 +56,18 @@ module Cxxproject
44
56
  def scan_lines(consoleOutput, proj_dir)
45
57
  raise "Use specialized classes only"
46
58
  end
59
+
60
+ def makeVsError(line, d)
61
+ if d.file_name == nil
62
+ return line
63
+ end
47
64
 
48
-
65
+ ret = d.file_name
66
+ ret = ret + "(" + d.line_number.to_s + ")" if (d.line_number and d.line_number > 0)
67
+ ret = ret + ": " + inv_severity(d.severity) + ": " + d.message
68
+ return ret
69
+ end
70
+
49
71
  end
72
+
50
73
  end
@@ -22,6 +22,7 @@ module Rake
22
22
  attr_writer :deriveIncludes
23
23
  attr_writer :preproFlags
24
24
  attr_writer :consoleOutput_fullnames
25
+ attr_writer :consoleOutput_visualStudio
25
26
  attr_writer :addEmptyLine
26
27
  def max_parallel_tasks
27
28
  @max_parallel_tasks ||= 8
@@ -69,6 +70,10 @@ module Rake
69
70
  @consoleOutput_fullnames ||= false
70
71
  end
71
72
 
73
+ def consoleOutput_visualStudio
74
+ @consoleOutput_visualStudio ||= false
75
+ end
76
+
72
77
  end
73
78
 
74
79
  class Jobs
@@ -1,7 +1,7 @@
1
1
  module Cxxproject
2
2
  class Version
3
3
  def self.cxxproject
4
- "0.5.60"
4
+ "0.5.61"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cxxproject
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.60
5
+ version: 0.5.61
6
6
  platform: ruby
7
7
  authors:
8
8
  - oliver mueller
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-01-15 00:00:00 Z
13
+ date: 2013-01-21 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: highline