-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
Qt Creator 2.8.1, Qt Creator 3.0.1
-
None
-
Ubuntu 12.10. Bug appears with Qt Creator 2.8.1 or 3.0.1 built against distro Qt libs (4.8.3); also with 3.0.1 installed against Qt 5.2 with Qt's binary installer.
After adding C++ files to manually-managed source lists for a CMake project, the "Parsing" bar appears and immediately goes red on the next build. New files appear in the source tree and the project builds successfully, but future searches based on the code model (e.g., "Find usages") may fail.
Simple reproduction (Creator 3.0.1 built against Qt 4.8.3):
-Create a new non-Qt CMake project.
-Replace the aux_source_directory() command in CMakeLists.txt with set(SRC_LIST main.cpp)
-Build (no failures)
-Create a new header/source file pair, e.g., Foo.h and Foo.cpp.
-Add Foo.h, Foo.cpp to the SRC_LIST
-Build: parsing fails.
If I close and re-open the project, parsing again succeeds.
Attachment demonstrates – open the CMake project, build, then uncomment Foo.h and Foo.cpp in CMakeLists.txt and build again.
Using 3.0.1 from the Qt 5.2 binary installer, adding files may succeed, but slightly more complex modifications to the CMakeLists.txt will still create the parse failure – e.g., adding set(CMAKE_CXX_FLAGS ...).