You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Sahlberg <da...@gmail.com> on 2024/08/17 15:04:41 UTC
Re: svn commit: r1919953 - in /subversion/branches/cmake/build/generator: gen_cmake.py templates/targets.cmake.ezt
Just a small nit, with the intention to limit variable scope.
Den lör 17 aug. 2024 kl 16:38 skrev <ri...@apache.org>:
> -def get_output_name(name):
>
- if name.startswith("lib"):
> - return name[3:] + "-1"
> +def get_output_name(target):
> + if target.name.startswith("lib"):
> + return target.name[3:] + "-1"
> + elif isinstance(target, gen_base.TargetSWIG):
> + module_name = target.name[len(target.lang + "_"):]
>
Is there a need to calculate module_name here?
> + if target.lang == "python":
>
Why not just here
> + return module_name
>
or even just:
return target.name[len(target.lang + "_"):]
> + else:
> + return target.name
Cheers,
Daniel