Re: svn commit: r1919953 - in /subversion/branches/cmake/build/generator: gen_cmake.py templates/targets.cmake.ezt

Daniel Sahlberg <[email protected]>
Newsgroups gmane.comp.version-control.subversion.svn,gmane.science.biology.informatics.taverna.devel
Message-ID <CAMHy98M9kdGk=He75RRbq-o+erEmgmzu3Fzxs27PnoxZSt_aHQ@mail.gmail.com>
Just a small nit, with the intention to limit variable scope.

Den lör 17 aug. 2024 kl 16:38 skrev <[email protected]>:

> -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.