I am writing C programs in Codelite.
To set compiler options (parameters) for an individual project I go to... Workspace > Open Active Project Settings > Compiler > C Compiler Options
Then I paste this in to the textbox --> -g;-O0;-Wall;-pedantic; -Wextra;-std=c99;
Is it possible to add those options somewhere so that ALL Projects in the same Workspace will have those compiler options?
Currently I have to set them again and again each time I create a new project.
Cheers,
Flex
Can I set Compiler Options for all Projects in a Workspace?
-
- CodeLite Curious
- Posts: 7
- Joined: Sun Jul 26, 2020 12:01 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Can I set Compiler Options for all Projects in a Workspace?
To apply compiler options across projects, use the environment variable CFLAGS (C) or CXXFLAGS (C++)
Just set them in the workspace settings or from settings -> environment variables
Eran
Just set them in the workspace settings or from settings -> environment variables
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 7
- Joined: Sun Jul 26, 2020 12:01 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Can I set Compiler Options for all Projects in a Workspace?
Thanks Eran,
I went to Settings > Environment Variables > in here I added the line... CFLAGS=-g -O0 -Wall -pedantic -Wextra -std=c99
And yes it applies those compiler settings to all projects I have in that same workspace.
Cheers,
flex
I went to Settings > Environment Variables > in here I added the line... CFLAGS=-g -O0 -Wall -pedantic -Wextra -std=c99
And yes it applies those compiler settings to all projects I have in that same workspace.
Cheers,
flex