Cuberite Forum

Full Version: change cmake gcc flags?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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
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?
I believe you should just be able to do

Code:
CFLAGS="-O3" CXXFLAGS="-O3" cmake ..."
yep thats it thanksBig Grin
(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.