diff options
author | Doug Schaefer | 2017-10-19 16:51:21 +0000 |
---|---|---|
committer | Doug Schaefer | 2017-10-19 16:52:38 +0000 |
commit | 50756f3f18138b33f0b004461503c77c12e85096 (patch) | |
tree | b9695a9f5a299c1299a715f5712daec75dc865c6 /build/org.eclipse.cdt.cmake.core | |
parent | 8a45638df7e16aab861b54fee882477b3aeee4f2 (diff) | |
download | org.eclipse.cdt-50756f3f18138b33f0b004461503c77c12e85096.tar.gz org.eclipse.cdt-50756f3f18138b33f0b004461503c77c12e85096.tar.xz org.eclipse.cdt-50756f3f18138b33f0b004461503c77c12e85096.zip |
Fix bugs with emscripten and scannerInfo.
Change-Id: I54d3691426a48c2a6f71fee4188364e57eea402d
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.java | 27 |
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); } } |