Message6103

Author malte
Recipients florian, gnad, haz, jendrik, malte, silvan
Date 2017-01-12.22:58:55
Content
New code looks nice!

I'd move the error checking (don't set FORCE_DYNAMIC_BUILD on unsupported
platforms) to the top of the function. I find this makes it clearer when reading
the code that all supported cases are covered. I also personally wouldn't make
FORCE_DYNAMIC_BUILD illegal on the Mac just because Mac builds are dynamic
anyway. But I also don't mind leaving things as they are.

In the dynamic build, I'm not sure if the line

            set(LINK_SEARCH_END_STATIC FALSE)

is necessary because I would expect this to be the default behaviour, but I also
don't think it hurts.


>> The usual way that makefiles support
>> static and dynamic linking is to provide binaries for both settings (say
>> "downward-static" and "downward-dynamic"). Is this infeasible with cmake?
>
> I wouldn't know how to do this. Given that we plan to use dynamic builds for
> profiling, we probably won't have too much cases where we switch between static
> and dynamic builds a lot.

Halving the time taken by the buildbot would be nice. :-) No need to look into
this now, but I'd appreciate if we could put in on our TODO list (do we have a
cmake TODO list?) at least as a wish item. For building libraries rather than
executables, this has been called "moderately easy":

http://stackoverflow.com/questions/2152077/is-it-possible-to-get-cmake-to-build-both-a-static-and-shared-version-of-the-sam
History
Date User Action Args
2017-01-12 22:58:55maltesetmessageid: <1484258335.14.0.559814828474.issue662@unibas.ch>
2017-01-12 22:58:55maltesetrecipients: + malte, haz, jendrik, silvan, florian, gnad
2017-01-12 22:58:55maltelinkissue662 messages
2017-01-12 22:58:55maltecreate