I just pushed to our GNU Radio master branch an update that allows us to set a few new build types. With our work in optimization, profiling, VOLK SIMD work, etc. etc., I added new build types to make setting up different testing scenarios a little easier by specifying the CMAKE_BUILD_TYPE.
- NoOptWithASM: sets '-g -O0 -save-temps' to add debug symbols, do no compiler optimization, and save all temporary build files, including the assembly .s files. This allows us to study the assembly output when using VOLK with SIMD intrinsics to make sure we're doing "the right thing."
- O2WithASM: sets '-g -O2 -save-temps' to also keep the assembly files but do some compiler optimization.
- O3WithASM: sets '-g -O3 -save-temps' to add the next stage of compiler optimization.
There are the cmake default build types that are always available: None, Debug, Release, RelWithDebInfo, and MinSizeRel.
These are just some build profiles you can use to set up the environments easily for different scenarios you might want to test. Just as an example, I used the new build types to see how optimization affected the overall time of the ctest:
- NoOptWithASM: 124.97 sec
- O2WithASM: 115.41 sec
- O3WithASM: 111.59 sec
So each stage of optimization shaves off some time. Of course, there's a lot of time taken here in the setup and tear down of each test. These numbers let us know that, sure, optimization is better, but why would anyone be surprised? Hopefully, no one. I just used this as a way to test that each build profile worked right and did what it was supposed to. I figured I might as well put the numbers out there, anyways, since I had them.