Registered Member
|
I have the following:
- some source code in FOLDER_HIERARCHY1 - CMake configuration files in FOLDER_HIERARCHY2 - Cmake generated build files in FOLDER_HIERARCHY3 These folder hierarchies are totally separated: in CMake configuration files I set the folders with the source code to be built and then I launch CMake to generate an out-of-source build structure. Now, I want to try the CMake support of KDevelop 1) I open/import a cmake project, by pointing to the main CMakeLists file - which contains some lines like this: foreach(MODULE ${MODULES_LIST}) add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/../${DIR}/${MODULE}/${CONFIGURE_PATH} "${CMAKE_CURRENT_BINARY_DIR}/build/${DIR}/${MODULE}") message(MODULE ADDED : ${CMAKE_CURRENT_SOURCE_DIR}/../${DIR}/${MODULE}/${CONFIGURE_PATH} ) endforeach() You can see that the CMakeLists file contains add_subdirectory declarations for building all modules (which are NOT located in subfolders of the ${CMAKE_CURRENT_SOURCE_DIR} folder) of the project. Result in Kdevelop : I see only the files/folders contained in ${CMAKE_CURRENT_SOURCE_DIR}. The "build" button works. Problem: I expect to see all source files that are used to build the project. I expect also to see all targets from the Makefiles generated by CMake. 2) I run cmake, I create the build folder hierarchy in FOLDER_HIERARCHY3 and Open/Import a custom makefile project. Result in KDevelop: I can see all the targets of the project. The "build" button works. I can build all the project or only a selected target of the project. Problem: no source file is shown in the project. I saw that CMake is supported only in the following case - in source build AND CMake configuration files are on the same hierarchy with the source code. This is a VERY specific case which doesn't seem too interesting for most of the CMake users. My question is: is CMake really supported in KDevelop? Out of source build (meaning that the locations of source code files and build files are separated) is one of the reasons I chose CMake as a build system tool. Thank you all ! |
Registered Member
|
This is still a problem. At least the subdirectory issue is. Setting an out-of-source build is possible now when importing a cmake project, but I still cannot conveniently browse my source when it is not all in canonical subfolders of my base cmake project.
|
Global Moderator
|
Hmm, so your problem is that you cannot have e.g. your CMakeLists.txt file in a different directory structure than the source code? I think this is indeed not supported in kdevelop, probably because nobody considered that use case. What are the advantages of doing it like that?
You can submit a bug report to bugs.kde.org if you like, that's more likely to get fixed than a forum topic. Greetings, Sven
I'm working on the KDevelop IDE.
|
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell