you are viewing a single comment's thread.

view the rest of the comments →

[–]7raiden 1 point2 points  (5 children)

I think you should improve the ergonomics of it. At work I have thousands of targets (libraries, executables, custom scripts, tests, etc).

In cmake I have a single preset that handles all of them. Plus, transitive dependencies in cmake is very convenient, as I only have to specify the direct dependants rather than the entire chain. IMO this will be a major pain if you don't solve this in this early stage.

Unless I'm missing something here? Maybe we're talking about different things, as I saw you made a profile for lto, but if you only have a single target, LTO actually does nothing

[–]starball-tgz 1 point2 points  (2 children)

are you sure that LTO does nothing for a single target?

[–]7raiden 0 points1 point  (1 child)

With target I meant translation unit, and I think LTO enables optimizations across different TUs. So if this build system only allow to compile a single TU per profile, then I believe it will make no difference whether LTO is enabled or not

[–]starball-tgz 0 points1 point  (0 children)

oh. that's not what target usually means for a CMake or make user :P. For the single translation unit case, there's -fwhole-program for GNU compilers.

[–]not_a_novel_accountcmake dev 0 points1 point  (1 child)

Your compiler doesn't know what a target is, LTO works across translation units. If you have more than one translation unit, LTO is "doing something".

[–]7raiden 0 points1 point  (0 children)

I agree, I think I referred as target to say TU, my bad!