Slow compilation in QtCreator
I'm using QtCreator for my project. The project uses CMake and builds about 30 very small shared libraries and an executable. When I change a single line of code and compile it, QtCreator takes somwhere between 3 - 5 minutes to compile my project (yes, it's a quite big one). However when I compile it directly via the terminal, the compilation takes less than 20 seconds. When I look at the compilation output, it seems that CMake and my compiler (via the terminal) only compile the files and libraries that were changed and quickly skip over the rest. QtCreator however takes way longer to process the files that were not even changed.
Why does this happen? Is it because I'm using CMake, or is this generally an optimization problem in QtCreator?
I'm working on a 64bit Linux with the latests gcc compiler.