suppress creation of non-existent output roots in IDEA for external build mode: this will allow the make to force module rebuild if output dir does not exist

This commit is contained in:
Eugene Zhuravlev
2013-01-08 13:21:29 +04:00
parent 47187ba5b4
commit 9a920bd4d0
@@ -2323,6 +2323,7 @@ public class CompileDriver {
final Set<File> nonExistingOutputPaths = new HashSet<File>();
final CompilerConfiguration config = CompilerConfiguration.getInstance(myProject);
final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
final boolean useOutOfProcessBuild = useOutOfProcessBuild();
for (final Module module : scopeModules) {
if (!compilerManager.isValidationEnabled(module)) {
continue;
@@ -2345,9 +2346,11 @@ public class CompileDriver {
}
else {
if (outputPath != null) {
final File file = new File(outputPath.replace('/', File.separatorChar));
if (!file.exists()) {
nonExistingOutputPaths.add(file);
if (!useOutOfProcessBuild) {
final File file = new File(outputPath.replace('/', File.separatorChar));
if (!file.exists()) {
nonExistingOutputPaths.add(file);
}
}
}
else {
@@ -2356,9 +2359,11 @@ public class CompileDriver {
}
}
if (testsOutputPath != null) {
final File f = new File(testsOutputPath.replace('/', File.separatorChar));
if (!f.exists()) {
nonExistingOutputPaths.add(f);
if (!useOutOfProcessBuild) {
final File f = new File(testsOutputPath.replace('/', File.separatorChar));
if (!f.exists()) {
nonExistingOutputPaths.add(f);
}
}
}
else {
@@ -2366,7 +2371,7 @@ public class CompileDriver {
modulesWithoutOutputPathSpecified.add(module.getName());
}
}
if (!useOutOfProcessBuild()) {
if (!useOutOfProcessBuild) {
if (config.getAnnotationProcessingConfiguration(module).isEnabled()) {
final String path = CompilerPaths.getAnnotationProcessorsGenerationPath(module);
if (path == null) {
@@ -2492,7 +2497,7 @@ public class CompileDriver {
}
}
}
if (!useOutOfProcessBuild()) {
if (!useOutOfProcessBuild) {
final Compiler[] allCompilers = compilerManager.getCompilers(Compiler.class);
for (Compiler compiler : allCompilers) {
if (!compiler.validateConfiguration(scope)) {