Page 1 of 1

Adding compiler flags

PostPosted: Sat Jun 18, 2016 12:15
by burli
I want to add some flags to the compiler, but I'm not shure where I can add them. I guess in the CMakeLists.txt in the /src directory, but in which line?

Re: Adding compiler flags

PostPosted: Sat Jun 18, 2016 18:09
by domtron vox
You should tell us if your using windows or linux and maybe explain a bit more about what your trying to do exactly(why you are adding flags etc).

I know on linux you can define some compile time values when running make as described here for run in place and here which is a list of all cmake flags.

I guess you can pass flags using "cmake . -flag1 -flag2=x ... etc" but, as I said, I'm just guessing based on the documentation and not experience.

Re: Adding compiler flags

PostPosted: Sat Jun 18, 2016 18:28
by burli
Linux.

And I think I got it. I just add the line

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
set(OTHER_FLAGS "${OTHER_FLAGS}