We are using the -Werror -Wextra -Wall -pedantic compiler flags, and C++11 diaelect. We want to use these for all of our projects. Currently we are setting these to each project by Project properties -> C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler
.
But this is a project-level setting.
I read lots of questions, i tried lots of things, but i did not found a working solution for setting the flags globally. Is there a way to do this? I am using the latest Eclipse (4.4 Luna), and the latest CDT (8.4).
I am also using eclipse luna.
In top menu : Window
-> Preferences
-> C/C++
-> Build
-> Settings
Select Discovery
tab, and change the CDT GCC Built-in settings
(if you use gcc).
Default is like :
${COMMAND} -E -P -v -dD "${INPUTS}"
change to
${COMMAND} -E -P -v -dD "${INPUTS}" -Werror -Wextra -Wall -pedantic
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.