Hi,
I'm trying to do a release build with a O2 optimization level instead of the default O3 that a release build will have. I know it's more a CMake question than a ZDoom question, but since it's what I am trying to build...
Thanks!
How to change optimization level when building?
Re: How to change optimization level when building?
Pass it to the compilation flags, as such:
Code: Select all
cmake <parameters> -DCMAKE_C_FLAGS="-O2" -DCMAKE_CXX_FLAGS="-O2"
Re: How to change optimization level when building?
Thanks, nightfall, but while this adds the "-O2" flag, the "-O3" flag is also present because of the "-DCMAKE_BUILD_TYPE=Release" cmake parameter...