Project not building when changes are made

Hi! I am trying out CLion on a small project and have been running into an issue of the project not builidng when I made changes to the code. When I try to build or clean and build I get the message "make: nothing to be done for 'myProject'". I'm running CLion 1.0.4 on an Ubuntu 14.04 VM.

I've tried making several changes to the code which range from commenting a declaration of a variable out to adding loops and system(myCommand) type calls. I've even tried introducing errors such as "int f = sdfshdkjhs; f+= itr->hello" (itr does not exist) and even though the IDE catches the error, when I try to build the project I get the same "make: nothing to be done for 'myProject'" If I close and reopen CLion it is able to build, though it's happening frequently enough that that is not an acceptable solution.

I'm fairly new to C++ so hopefully I'm just being a numscull and doing something silly on my end, any help is appreciated. Thanks!

Comment actions Permalink


When it happends, could you please go to your build directory (can be found in build output window), run "make" there from command line and check if build is actually started or not. Also how did you add your source files to your CMake target? Is your project up-to-date with your CMakeLists.txt? Are you using GLOB/GLOB_RECURSIVE? In this case CMake wouldn't update automatically if new files where added to the project

Comment actions Permalink

Thanks so much! I'll try checking the build directory next time it happens. CMake.lists is up to date, I haven't added any new files, just code to existing ones. All files were added through CLion -> new source or header file.



Please sign in to leave a comment.