Adding compiler flags

For people working on the C++ code.
Post Reply
User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Adding compiler flags

by burli » Post

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?

User avatar
domtron vox
Member
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: Adding compiler flags

by domtron vox » Post

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.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Adding compiler flags

by burli » Post

Linux.

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

Code: Select all

set(OTHER_FLAGS "${OTHER_FLAGS}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest