Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2017-10-19 16:51:21 +0000
committerDoug Schaefer2017-10-19 16:52:38 +0000
commit50756f3f18138b33f0b004461503c77c12e85096 (patch)
treeb9695a9f5a299c1299a715f5712daec75dc865c6 /build/org.eclipse.cdt.cmake.core
parent8a45638df7e16aab861b54fee882477b3aeee4f2 (diff)
downloadorg.eclipse.cdt-50756f3f18138b33f0b004461503c77c12e85096.tar.gz
org.eclipse.cdt-50756f3f18138b33f0b004461503c77c12e85096.tar.xz
org.eclipse.cdt-50756f3f18138b33f0b004461503c77c12e85096.zip
Fix bugs with emscripten and scannerInfo.
Diffstat (limited to 'build/org.eclipse.cdt.cmake.core')
-rw-r--r--build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java27
1 files changed, 11 insertions, 16 deletions
diff --git a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java
index 1308426d97d..14d9fae4f0b 100644
--- a/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java
+++ b/build/org.eclipse.cdt.cmake.core/src/org/eclipse/cdt/cmake/core/internal/CMakeBuildConfiguration.java
@@ -61,12 +61,7 @@ public class CMakeBuildConfiguration extends CBuildConfiguration {
} else {
toolChainFile = manager.getToolChainFileFor(getToolChain());
if (toolChainFile != null) {
- settings.put(TOOLCHAIN_FILE, toolChainFile.getPath().toString());
- try {
- settings.flush();
- } catch (BackingStoreException e) {
- Activator.log(e);
- }
+ saveToolChainFile();
}
}
}
@@ -78,20 +73,20 @@ public class CMakeBuildConfiguration extends CBuildConfiguration {
public CMakeBuildConfiguration(IBuildConfiguration config, String name, IToolChain toolChain,
ICMakeToolChainFile toolChainFile, String launchMode) {
super(config, name, toolChain, launchMode);
- this.toolChainFile = toolChainFile;
- saveToolChainFile();
+ this.toolChainFile = toolChainFile;
+ if (toolChainFile != null) {
+ saveToolChainFile();
+ }
}
private void saveToolChainFile() {
- if (toolChainFile != null) {
- Preferences settings = getSettings();
- settings.put(TOOLCHAIN_FILE, toolChainFile.getPath().toString());
- try {
- settings.flush();
- } catch (BackingStoreException e) {
- Activator.log(e);
- }
+ Preferences settings = getSettings();
+ settings.put(TOOLCHAIN_FILE, toolChainFile.getPath().toString());
+ try {
+ settings.flush();
+ } catch (BackingStoreException e) {
+ Activator.log(e);
}
}

Back to the top