Files do not appear in Projects list
-
I have created my project in QtCreator by opening an existing CMakeLists.txt file. On the "Edit" tab, in the "Projects" panel, I see the directory structure of my project, but only a few (6) out of the hundreds of source files in my project appear inside the directories. If I switch to "File System" in the drop down (verus "Projects"), I can see all the files. Is there a reason that the files would not have been included in the project? A pattern might be that it got the .cpp files, but skipped the .h and .hpp files?
Thanks,
David
-
Creator will only see the files cmake considers to be part of the project. Unfortunately CMake projects tend to only list the source files:-(
-
Duck, no, the hpp files are not required to be listed in the CMakeLists.txt because they are not compiled explicitly into their own objects.
Is there a way to list these files in the CMake? Is there a "good CMake style" way to do this (since it works without the files being mentioned explicitly, it seems like there must be a special way to say "these files are part of the project, but don't do anything with them"?).
Thanks,
David
-
I'd expect just adding the headers in the same place where you add the sources would do the trick. Whether that is good cmake style I don't know (I am not using it), but from Creator's point of view the question whether a certain file is considered "part of the project" or "part of the system" is answered by whether it is mentioned in the project file, independent of the build system.
-
I had another issue and came to this topic:
Project files didn't show up in combination with CMake if the current directory has whitespaces (e.g. "Program Files (x86)" in it. Only CMakeLists.txt was listed in QtCreator 2.7.0, however, building succeeded without errors.
-
braggpeaks: Please do not abduct threads. Open your own!