change cmake gcc flags?
#1
hey,
I was wondering if you can compile cuberite with different gcc flags like march=native option ... would like to test if there is any difference in performance. But I have no idea how cmake works so is this possible? and what I would have to do?
Reply
Thanks given by:
#2
By default I believe that Cuberite is compiled with march=native (unless you use the CROSSCOMPILE flag)

https://github.com/cuberite/cuberite/blo...cmake#L127
Reply
Thanks given by:
#3
ok march was a bad example. I also meant other experimental flags like -O3 and -ffast-math.
So do I have to add them to that line or is there another way to pass through these flags?
Reply
Thanks given by:
#4
I believe you should just be able to do

Code:
CFLAGS="-O3" CXXFLAGS="-O3" cmake ..."
Reply
Thanks given by:
#5
yep thats it thanksBig Grin
Reply
Thanks given by:
#6
(04-07-2016, 11:35 PM)danny9484 Wrote: ok march was a bad example. I also meant other experimental flags like -O3 and -ffast-math.
So do I have to add them to that line or is there another way to pass through these flags?

If you compile with -DCMAKE_BUILD_TYPE=RELEASE -O3 and -ffast-math are used as well.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)