Skip to content

Setting up Eclipse to edit Scylla

Botond Dénes edited this page Nov 3, 2017 · 6 revisions

Heap size

In /etc/eclipse.ini, Eclipse's maximum heap size is specified, and usually set to 1024 MB. This is likely to be not enough (at least, it isn't for me). So edit /etc/eclipse.ini, replacing the line

-Xmx1024m

By something bigger, e.g.,

-Xmx2024m

On Fedora systems, /etc/eclipse.ini get overwritten on every Eclipse upgrade, so you'll need to repeat this change after upgrading Eclipse.

CDT hack to partially support C++14 capture

Note: this works on Eclipse Neon. It may or may not work on earlier versions.

In Eclipse, click on "Help -> Install New Software"

Click "Add..." then add the URL http://eclipse.scylladb.com/cdt/.

Mark the "CDT Main Features -> C/C++ Development Tools" (I don't think you need any of the other stuff) and click "Next". After a short wait, it tells you you already have this so a upgrade will be performed. click "Next". Accept the license, and click "Finish".

When seeing a "Security Warning" about unsigned content, trust Avi and press OK.

When asked, say it is "OK" to restart Eclipse.

Configure Eclipse for C++14

Create a C++ project for Scylla with the directory you checked out.

In Eclipse, right-click on project's name, "Properties". Now go to "C/C++ General" -> "Preprocessor ..." Edit the "CDT GCC Built-in Compiler Settings" by unchecking the "Use global provider shared between projects" and add to the command at the bottom the string "-std=gnu++1y". Then "move up" this "CDT GCC Built-in Compiler Settings" to the top.

Rebuild the index using Project -> C/C++ Index -> Rebuild. Don't forget this last step, even if Eclipse pretended to have rebuilt your index after you changed the setting above!

Generated code

Some of our header files are generated, and lives in build/*/gen. We need to tell Eclipse to add this to the include path. Remember you need to set up Eclipse after having run "ninja" once, or these files will be missing!

As above, right click your project and choose "Properties". Now "C/C++ General" -> "Preprocessor ...". In Gnu C++, in "CDT User Setting Entries", click "Add..." and add the directory build/release/gen.

Clone this wiki locally