This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 158705 [details] Screenshot from the New Project dialog showing error message I want to create a new project based on an existing CMake based project. In the "new Project" dialog it is not possible to set the path to the CMake binary. My cmake binary comes from Ports and is /opt/local/bin/cmake. It is of course in $PATH, also for Netbeans. The project setup dialog complains that it can not find cmake without giving me any way to see where it's looking, what it's really looking for nor any way to change it. Perhaps the "Custom command" could work, but then the next page in the dialog makes no sense really and as there is "native" support for CMake I want to use that. Please let users know what they can do when something is wrong instead of just showing an unhelpful error.
In my case cmake was installed after Netbeans was installed. The solution is to set the path to the cmake binary in Preferences -> C/C++ -> Build Tools. Would be nice if the New Project dialog could tell me about this possibility.
Let me change this bug to enhancement, please. We can do better job from the second page of the wizard and explain "where" to set path to cmake. Ok?
I will leave it as usability bug ;-)
Created attachment 158719 [details] Screenshot showing error
Well, take a look at this screenshot. I'm trying to configure out-of-source builds and tried to create a new project and fiddle with the exceptionally confusing settings in that dialog (apparently it can be done somehow, but Darwin knows how to set it up (it ought to be a simple checkbox "Build in separate build directory")). So I ran into this. Cmake not found but it's set just fine in the preferences. Just to be clear, I opened the preferences after seeing the error.
Created attachment 158720 [details] Different error
If I toggle the "Script type" to, say, QMake and back to Cmake I get a different error. The CMakeLists.txt file is still there as stated in the edit field, but somehow it's now not found? I have to select the same script again. It seems the backend state clears the script internally, but doesn't update the UI to reflect that.
(In reply to chakie from comment #5) > Well, take a look at this screenshot. I'm trying to configure out-of-source > builds and tried to create a new project and fiddle with the exceptionally > confusing settings in that dialog (apparently it can be done somehow, but > Darwin knows how to set it up (it ought to be a simple checkbox "Build in > separate build directory")). So I ran into this. Cmake not found but it's > set just fine in the preferences. Just to be clear, I opened the preferences > after seeing the error. Darwin allows to see two modal dialogs? Iteresting... On Linux I need to close project wizard, then open Options, adjust and then start project wizard again. I can not have two modal dialogs visible at once. Btw, in your case what was the tool collection chosen on the first step of wizard? I see CLang and GNU. Does the "used one" have cmake specified?
Btw, it's worth to specify in error message that cmake was not found in Toolchain_Name
Also it can make sense to warn that "Run in Folder" for cmake is recommended to be changed not to clutter source tree
Now that you mention the modality, it was really weird. I could move the preferences dialog separately, but if I tried to move the new project dialog, both window moved as one. I was playing a lot of back and forth in that dialog, trying to understand how it works and get a setup that fit my needs. After cheking, I have specified the path to cmake only in one of those toolchains and it is quite possible I had picked the wrong one at the time of the screenshot. It would help a lot if the error message told me what it looked for and where, and preferably even mention the toolchain.
(In reply to chakie from comment #11) > Now that you mention the modality, it was really weird. I could move the > preferences dialog separately, but if I tried to move the new project > dialog, both window moved as one. > > I was playing a lot of back and forth in that dialog, trying to understand > how it works and get a setup that fit my needs. After cheking, I have > specified the path to cmake only in one of those toolchains and it is quite > possible I had picked the wrong one at the time of the screenshot. > > It would help a lot if the error message told me what it looked for and > where, and preferably even mention the toolchain. I agree. This is what I mean in comment https://netbeans.org/bugzilla/show_bug.cgi?id=258209#c9 Btw, I'm glad that "Run in Folder" solved your "cluttering" issue? :-)
One important comment about "Run in Folder". Let's say you specified on the first step /some/path/project/src (which contains CMakeList.txt) then you specified /some/path/project/build (to put build artifacts here by cmake) In case when your build folder would contain some auto generated config specific sources/headers which you would like to see in project => I would recommend on the step "Source Files" you should add /some/path/project and remove /some/path/project/src to specify common root between /some/path/project/src & /some/path/project/build
"Run in folder" solved the clutter exactly as I wanted!
fixed, change set: http://hg.netbeans.org/cnd-main/rev/d81382e15aa8
Integrated into 'main-silver', will be available in build *201603180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d81382e15aa8 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #258209 Help to set path to the cmake binary (to be used by NB)