How to use CLion with our software

From OPeNDAP Documentation

Setting up CLion to work with our software is really the same as using CLion with a 'Makefile' project. By default, CLion uses CMake to to figure out which files are part of a program or library. The problem for our software, and any software that does not use CMake, is that most of the benefit(s) of CLion (or any IDE) depend on knowing all the files that are used to build a program or library.

This page shows how to set up CLion with software that uses make and/or autotools.

The whole server or just parts

First, you need to decide if you want to work with all of the C++ code as one 'project' or use a separate project for each of 'hyrax-dependencies,' 'libdap4,' and 'bes.' In practice, you choose one way and then switch without paying too great a penalty.

For the rest of this HowTo, I'll assume you have done the following:

  1. Checkout the hyrax git repo from GitHub ( and ...
  2. Have used the script(s) to checkout the three C++ projects 'hyrax-dependencies,' 'libdap4,' 'bes.'
  3. Or, you've done something else to get our server code...

Open a directory that contains code

When you start CLion, you will see a dialog box New Project dialog

Click on the New CMake Project from Sources and you will see the following Choose the directories to scan

Use this dialog to choose which directories to scan. CLion will scan the selected directories. looking for code to be compiled and also, in the lower panel, for headers to be included. In the later case, code all the dirs with headers you want to be found. For Hyrax, that means the $prefix/build/deps/include and $prefix/build/include directories.