On Thu, Mar 28, 2019 at 09:32:44PM +0000, Ken Moffat via blfs-dev wrote:
>
> Will look at some cmake packages later. I've now created #11872 for
> this.
>
I've now started to look at cmake applications.
I build the following which already use -DCMAKE_BUILD_TYPE=Release
and have tests:
libjpeg-turbo, llvm, inkscape (there may be others), so in general
using Release seems a sound approach.
One of the packages which does not specify the build type is tiff.
It also has a testsuite. I confirmed that building by the book,
using ninja -v to determine the commnads, no flags are passed (no
variant of -O, nor -g). That matches the expected behaviour.
I then tried a release build of tiff : -O3 and -DNDEBUG were added.
In both variants, all 86 tests passed, so assertions don't seem
relevant.
After that, I tried specifying my own CFLAGS and CXXFLAGS ( -O2
and -march=native) to see if they would be picked up in a release
build. Here, thre is a difference from meson:
In meson release builds, user-specified flags come last, and
therefore override any contradictory flags already specified.
But in cmake the user's flags come first. That means that although
my own -march will be passed, my -O2 will be overridden by the -O3
from the release.
I want to check some more cmake packages, to see how different the
times and sizes are : tiff is still less than 0.1 SBU, and the sizes
are almost identical, but its actual build is considerably slower
(5.429s instead of 1.605s on one run of each ;-)
ĸen
--
It is said that there are two great unsolved problems in computer
science: naming, cache invalidation, and off-by-one errors.
-- Ben Bullock
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page