Change default compiler settings

General questions regarding the usage of CodeLite
asdfxcvad
CodeLite Curious
Posts: 2
Joined: Sun Sep 18, 2016 4:05 am
Genuine User: Yes
IDE Question: C++
Contact:

Change default compiler settings

Post by asdfxcvad »

I've been playing with compiler settings recently but as far as I can see there's no way to change the default compiler settings for new projects.
This has left me having to manually add some commonly used options to several new projects by hand. Is it possible to change the default compiler settings? (possibly in a config file somewhere as I've found no option to do this through the software.)

Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Change default compiler settings

Post by eranif »

Can you please provide some more info of what are you trying to do?
And what you tried so far
Make sure you have read the HOW TO POST thread
asdfxcvad
CodeLite Curious
Posts: 2
Joined: Sun Sep 18, 2016 4:05 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Change default compiler settings

Post by asdfxcvad »

Sorry, I've been a bit of a fool, I've found the solution now.

I'm currently making several projects which require the "-std=c++11" flag to be passed to the compiler. To save time, I was currently trying to make it such that whenever I start a new project, that flag is added as standard to the compiler settings.
Essentially, I was trying to change the compiler options in the template which I was using. I've now found the templates folder and have made a corrected template with the new option.

Thanks anyway :)
rburkhardt
CodeLite Curious
Posts: 1
Joined: Thu Sep 29, 2016 6:18 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: Change default compiler settings

Post by rburkhardt »

I am attempting to do the same thing but am not figure out what template I would need to change. Could you direct me to the correct template, I am using gnu gcc
User avatar
eranif
CodeLite Plugin
Posts: 6367
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Change default compiler settings

Post by eranif »

From: settings->build settings->compilers->YOUR COMPILER->Tools tab->C++ compiler field add the flag to the current value, for example, so instead of something like this:

Code: Select all

C:/TDM-GCC-64/bin/g++.exe
Change it to:

Code: Select all

C:/TDM-GCC-64/bin/g++.exe -std=c++11
Eran
Make sure you have read the HOW TO POST thread
Post Reply