QtCreator temporarily adds additional include paths?
-
In a project with multiple developers and a CI-Server we saw some strange behavior.
It seems when adding files within QtCreator, it injects some include-path into the build like having the project-root-dir added as include-path. (which tempt some developer to write/commit wrong includes)
When building the qmake-project without QtCreator (e.g. on our CI) it then doesn't have this additional includepath.This sometimes screws up the test-build before checkin, as it builds well via QtCreator.
... and the CI gets broken at least once a week by this.It probably only is visible because we don't have the project-root-dirs as includepath within the sub-projects.
(so, workaround would be to add them to the qmake ...)Has someone experienced some similar behavior?
Or even knows why/where QtCreator injects the additional includepath?(I know that this would also fit into the bugtracker ... but I preferred to understand it first, before calling it a bug)
-
This is expected. Qt Creator is doing all it can to run your applications smoothly and without errors. This means it is modifying the environment. You can check everything in Build and Run options of your project.
-
it's not about running the application ... the effect that I see is that there is something inject into the compile-steps which doesn't happen when building from console ...
it just came to my mind that one difference is also that creator builds on jom, while our CI builds via nmake ... but in theory this shouldn't inject includepaths
Oh, btw. forgot to mention that it is Windows(7 and XP) with VS2008 ... qt4.8 prebuild ...
-
Same is true for building. Open your project, go to "Projects" pane, then open build settings, and see the last section on the bottom: "Build environment" it contains all the variables that Qt Creator uses to build your project.