Bug 332728 - Importing a CMake project never finishes
Summary: Importing a CMake project never finishes
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: 4.6.0
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2014-03-28 08:56 UTC by Eric
Modified: 2014-04-01 11:04 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Minimal c++ Cmake project that shows the issue. (749 bytes, application/octet-stream)
2014-03-28 08:58 UTC, Eric
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric 2014-03-28 08:56:14 UTC
While importing a CMAKE project the progress bar never dissapear and the project is not imported at all. Quitting and reloading kdevelop resets everything, but does not clear the issue - if I try to import the same project, it keeps doing nothing at all.



Reproducible: Always

Steps to Reproduce:
1. click on project / import project
2. choose the CMAKELISTS.txt (e.g. from the attached archive i'll submit in the following comment). The cmakelists.txt should have an add_subdirectory(XXX) command pointing to an inexistent directory XXX (eventhough a test prevents actually reaching it. i.e. it is not an error)
3. set the build directory (empty one)

Actual Results:  
The progress bar (import) never advances, keeps busy forever.
The project does not appear in the project list ever, and is not added in the current session at all.

Expected Results:  
progress bar closes and project appears in the project list, and is added to the current session

Please see attachment in the 1st comment.
Comment 1 Eric 2014-03-28 08:58:12 UTC
Created attachment 85805 [details]
Minimal c++ Cmake project that shows the issue.

Please import the outermost (root) CMakeLists.txt in Kdevelop.
Comment 2 Kevin Funk 2014-03-30 20:45:52 UTC
This might be related to the other CMake bug we have with cyclic dependencies. Aleix, please check.

See bug 330697.
Comment 3 Aleix Pol 2014-04-01 11:04:45 UTC
Git commit 492af697f18924a798744a33c3fe0c0a81a9f3b8 by Aleix Pol, on behalf of Pavel Petrushkov.
Committed on 01/04/2014 at 11:04.
Pushed by apol into branch '4.6'.

Fix for importing a CMake project with missing directories

Importing project with nonexisting, but added in add_subdirectory() directories no longer causes KDevelop to load forever. Problem was in creating CMakeCommitChangesJob before checking if directory actually exists.

REVIEW: 117213

M  +5    -0    projectmanagers/cmake/cmakeimportjob.cpp

http://commits.kde.org/kdevelop/492af697f18924a798744a33c3fe0c0a81a9f3b8