The -sourcepath option can't be passed multiple times to javac, since it simply overrides prior arguments. Instead -sourcepath takes a colon (or semi-colon on windows) separated list of paths.pull/3577/head
parent
8a9f7cf133
commit
65b730bd59
4 changed files with 41 additions and 1 deletions
@ -0,0 +1,8 @@ |
||||
package com.mesonbuild; |
||||
|
||||
class Simple { |
||||
public static void main(String [] args) { |
||||
TextPrinter t = new TextPrinter("Printing from Java."); |
||||
t.print(); |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
package com.mesonbuild; |
||||
|
||||
class TextPrinter { |
||||
|
||||
private String msg; |
||||
|
||||
TextPrinter(String s) { |
||||
msg = s; |
||||
} |
||||
|
||||
public void print() { |
||||
System.out.println(msg); |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
# The Ninja backend used to try and pass -sourcepath repeatedly for |
||||
# multiple includes which would discard prior includes. Since this |
||||
# won't compile without the '.' include, this ensures that multiple |
||||
# paths are passed in a [semi-]colon separated list instead... |
||||
|
||||
project('includedirsjava', 'java') |
||||
|
||||
javaprog = jar('myprog', |
||||
'com/mesonbuild/Simple.java', |
||||
'com/mesonbuild/TextPrinter.java', |
||||
main_class : 'com.mesonbuild.Simple', |
||||
include_directories : [ include_directories('com'), |
||||
include_directories('.'), |
||||
include_directories('com/mesonbuild') ]) |
||||
test('subdirtest', javaprog) |
Loading…
Reference in new issue