Am Mittwoch, 24. April 2019, 19:07:13 CEST schrieb Jean-Marc Lasgouttes: > Le 20/04/2019 à 21:27, Kornel Benko a écrit : > > I tried to add the options to CMake build. I don't see any difference in > > lyx-behavior, > > apart from the size of executables. > > Other difference to the automake are the supplied flags to gcc (compile and > > link time), > > namely "-flto -fno-fat-lto-objects". > > > > The needed set of cmake variables are: > > 1.) cmake_minimum_required(VERSION 3.9) > > are we ready for that? 3.9 was released July 2017 > > As a user of ubuntu 16.04 at work, which is limited to cmake 3.5, I am > tempted to say "no".
Yes. It seems sufficient to use version 3.1. To add the option we check first,
if the policy 0069
exists. Having this option we can check if the optimization is available for
the used compiler.
> > 2.) cmake_policy(SET CMP0069 NEW)
> > This policy started with version 3.8, it enables the use of 3.)
>
> I love this :)
>
> > 3.) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
> > This enables the optimization for compilers which support it. (Clang
> > for instance does not belong to this set)
>
> It is nice that cmake has built-in support for that.
Yes :)
> JMarc
Kornel
signature.asc
Description: This is a digitally signed message part.
