Global include
-
-
No, Qt Creator does not have such an option. There is a reasons for this:
We want projects to be usable for people that do not want to use creator for whatever (obviously misguided;-) reasons. So we can not put options that need to be applied for every build into Creator. Those need to go into the build system.
So why don't we add code into your build system for you? Doing so will limit which compilers can be used to build your project. Which compilers need to be supported is a decision the project-team has to make. We do not want creator to take away decisions from the developers.
You can do this manually by adding code into the .pro-files (or CMakeLists.txt or whatever you use;-).
It is pretty straight forward: You just need to check for compilers used and add the appropriate flags (check the documentation for those).
The following code sets some compiler specific flags for qmake based project (default kind of project in Creator):
@
g++:QMAKE_CXXFLAGS += -Wall -Werror
clang:QMAKE_CXXFLAGS += -Wall -Werror -Wno-something
icc:QMAKE_CXXFLAGS += -Wall -Werror -Wno-something-else
@(Note: Brain to terminal, untested)