Version: 4.0.60 (using KDevPlatform 1.0.60) (using 4.4.3 (KDE 4.4.3), Debian packages) OS: Linux (x86_64) release 2.6.32-3-amd64 There is a significant difference between CMake and KDevelop's parser in the order subdirectories are parsed. Here is a very simple testcase that shows the wrong behavior: CMakeLists.txt: message(STATUS "before") add_subdirectory(sub) message(STATUS "after") sub/CMakeLists.txt: message(STATUS "this is the subdir") CMake 2.8.1 output: -- before -- this is the subdir -- after KDevelop 4.0 output: message: ("before") message: ("after") message: ("this is the subdir") CMake parses subdirectories immediately upon seeing add_subdirectory, while KDevelop seems to put the directory in a pending queue, and only after it's done processing the current dir, it processes the queue.
I just found that (in official CMake) SUBDIRS() does add dirs to a queue to process them later, while ADD_SUBDIRECTORY() processes the subdir immediately. So the current KDevelop behavior for SUBDIRS is correct.
We are not processing directories anymore