Adding compiler flags

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

Adding compiler flags

by burli » Sat Jun 18, 2016 12:15

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: 106
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: Adding compiler flags

by domtron vox » Sat Jun 18, 2016 18:09

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: 1313
Joined: Fri Apr 10, 2015 13:18

Re: Adding compiler flags

by burli » Sat Jun 18, 2016 18:28

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}
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 2 guests

cron