

In the dialog that pops up, navigate to the directory that contains your sources: The key thing is that you convince CLion that this is a Makefile project: idea directory, you can just 'Open' the directory or go into the repo directory and open the Makefile.
#Clion generate cmakelists.txt code
What is important is that the directory contain a Makefile.Īssuming your source code (I'm using libdap4) does not contain a. Where you can fiddle with the arguments to configure (you don't need -enable-developer and you can use whatever path you want for the prefix value). configure -prefix=$prefix -enable-developer Since we have a CMakeList.txt file in the repo, we need to have a Makefile in there, too. builds where the errors and warnings are clickable links into the actual code (no more matching errors to line numbers in the editor).īefore going to the next section, if you are using a fresh checkout of the sources, use autoreconf and configure to get a valid Makefile. Not having to maintain two lists of sources and, 2. This has several advantages, including 1. Now, in the renaissance, we can configure our projects using the Makefiles that we actually use to build the code. In the (dark) past, we had to use CMake to do this. We have 1,000s of files and 100,000s of lines of code. The real power of something like CLion is that it can read and analyze the source code, providing a way to navigate from file to file finding the stuff you want without you doing too much searching. idea directory in there already, remove it (there's nothing sacred in there.). idea directory in the at the top level of the project it opens. CLion only reads project information from the.


If there isn't, you should be able to open the libdap4 directory and follow all of the instructions that follow. However, if you have already opened the hyrax repo, take a quick peak in the libdap4 directory it contains and see if there's an. I think it's best to have the three C++ projects/repos ( hyrax-dependencies, libdap4, and bes) each opened independently, so let's do that, and open libdap4 for now. Always using spath.sh saves you from that particular nightmare. It does, however, contain a script called spath.sh that sets up some SHELL environment variables you may find useful and that will keep you from endless hours of headscrathing while you try to sort out why changes made to libdap don't seem to have any effect (the answer is that you have a hidden version of libdap installed in /usr/local/ and it's that library that is being used, not the copy you have just changed). The 'magic' provided by the hyrax project is minimal. Or, you've manually cloned the hyrax-dependencies, libdap4, bes repos somewhere useful to you (which can be that hyrax directory).Have used the script(s) to clone the three C++ projects hyrax-dependencies, libdap4, bes in that hyrax directory.

