
- CLION MAKEFILE INSTALL
- CLION MAKEFILE CODE
If not, then the Target described here won't work (but is still required as a placeholder).
CLION MAKEFILE CODE
But, for libdap, the Target will only build the code if bison 3.x is installed in a directory on your default PATH. The Target is needed for the Application to be valid, and for things like the BES, the Target also works to build the code. This is tricky because you have to do two steps here, one is to set up a Custom Build Target and the second is to set up a Custom Build Application.
CLION MAKEFILE INSTALL
This will install the bison executable in /usr/local/bin which technically 'pollutes' your build environment, but means that most of the complicated things you need to do with the PATH environment variable in the following section become moot. Goto the hyrax-dependencies/src/bison-x.y directory and re-run configure using the defaults (i.e., just run. This shows that, for hyrax, you need to source the spath.sh file.įor our Hyrax project you can make your work easier if you do one little, but somewhat odd, step first.
Using a Custom Build Application is similar to the Makefile plugin but does set the IDE up debugging and does provide a decent way to link to warnings/errors. Using the Makefile plugin is another way, but the result does not provide an easy way to find compilation warnings or errors (that is, click on the error and goto the source file/line without having to search). This is the simplest way to run builds, but it does not lay the groundwork for debugging. It is just like a regular terminal window, so you need to source spath.sh at the root of the hyrax project. There are several ways to run builds from within CLion. I'm not sure if this is useful or if editing the CMakeLists.txt file will be sufficient for our needs. However, it will work to pipe the output of make into compiledb, like this make -nwk all | compiledb. Second, command line arguments to make seem to confuse compiledb. Unless the directory is clean (i.e., make clean) make won't build anything and compiledb won't put anything in the database. In the simplest use, this tool is used like this compiledb -n make. This is built from a python tool called compiledb. The CMakeLists file is one of two 'databases' you can make for CLion to describe the contents of a C++ project - the other is a compiledb json file. It should look 'good' in the sense that there are not many false positive error flags. Regardless of my parenthetical comments, you should see something like this:ĭrive around in the source panel and open some code. It may be that we need to add some extra directories to it for things like the libxml2 and curl headers). Once this process completes, you should get a CMakeLists.txt file that is pretty comprehensive (AFAIK, this cannot be used to build code without some additions, but it serves as a database for CLion. The end result will take a few seconds to load and will show messages at the bottom of the screen regarding various scanning and indexing operations. For Hyrax, that means the $prefix/build/deps/include and $prefix/build/include directories. In the later case, code all the dirs with headers you want to be found. looking for code to be compiled and also, in the lower panel, for headers to be included. CLion will scan the selected directories. Use this dialog to choose which directories to scan. When you start CLion, you will see a dialog boxĬlick on the New CMake Project from Sources and you will see the following Or, you've done something else to get our server code. Have used the script(s) to checkout the three C++ projects 'hyrax-dependencies,' 'libdap4,' 'bes.'. Checkout the hyrax git repo from GitHub ( ) and. 3.2 Setting up Custom Build Applicationsįirst, 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.įor the rest of this HowTo, I'll assume you have done the following:.