Bug 356875

Summary: CMake Error: Could not create named generator 1
Product: [Applications] kdevelop Reporter: bungeman
Component: Build tools: CMakeAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: 6yearold, kfunk
Priority: NOR Keywords: release_blocker
Version First Reported In: git master   
Target Milestone: 5.0.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description bungeman 2015-12-18 16:21:51 UTC
After the fix for https://bugs.kde.org/show_bug.cgi?id=353180 the cmake generator settings now persist, but they persist as 0 and 1 instead of as UnixMakefiles and Ninja. As a result, if I go select Ninja as the cmake build generator and then open a brand new cmake based project (without the cmake .json file already existing) the Build window reports:

/skia/build> /usr/bin/cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -G 1 /home/bungeman/src/skia
CMake Error: Could not create named generator 1
*** Failure: Exit code 1 ***

Reproducible: Always

Steps to Reproduce:
1. Build kdevplatform (3152fcd981c3a138eac1bfda6f3857919760ff99) and kdevelop (da400048101f686f49fe47c37f706d4f365ad83e) on the current 5.0 branch.
2. Set the CMake build generator to non-default and apply.
3. Open an existing CMakeLists.txt based project which has not yet had cmake run on it.

Actual Results:  
CMake Error: Could not create named generator 1

Expected Results:  
Generate.

If I 'vim ~/.config/kdeveloprc' replace

[CMakeBuilder]
generator=1

with 

[CMakeBuilder]
generator=Ninja

then the configuration settings are messed up, but the above problem is alleviated.
Comment 1 Kevin Funk 2015-12-18 17:26:03 UTC
Yep, confirmed. We've just seen this yesterday.

Will fix shortly.