0

I have a lot of code used by our group. The group gave me a document that explains how to set up the makefile. However, the postdoc entered the commands really fast before and got it to work for a similar project, so I didn't get to understand how the process works. Now that I am working on a different project, though similar to the one above, I need to run make for this new project but don't want to ask that postdoc again

The document explains that I have to do the following:

1. create a new Build directory and cd in there

2. Run ccmake with CMakeLists.txt located in the (root) source folder (I saw the postdoc type `ccmake ../CMakeLists.txt`)

3. then press 'c' and then g

However, I entered all those steps and do not see a makefile in Build, hence I'm getting an error. I'm confused at the 2nd step, I see the following:

CMAKE_BUILD_TYPE               Release                                      
 CMAKE_INSTALL_PREFIX          /usr/local                                   
 PRE_BUILD                     ON                                           
 USING_SUBVERSION              OFF 

I'm not sure if I'm supposed to use Release for CMAKE_BUILD_TYPE? For step 3, I don't see anything in that Build folder. I remember the postdoc entered rm CMakeCache.txt, but I don't remember when or in which directory. What should I do?

1 Answer 1

1

Traditionally, if you are in the root directory of your code base, you should be able to do this:

mkdir Build
cd Build
cmake ..
make

Run the commands above and see how it goes. If that works, try again using ccmake, just in case pressing c and g actually makes a significant difference.

Before you re-try the build, I suggest delete your old Build folder to keep things clean.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .