سؤال

Is it possible to have a target which generates file with dots in the filename? I don't need them in target name, just in the filename it produces, so for example

lib Auhorization@Plugin : ...

would be perfectly fine, if it produces libAuthorization.Plugin.so and if I can use it from other targets:

exe Application : ... : <library>Authorization@Plugin ...

As using dots is the company convention, I cannot just use underscores instead.

One option would be some requirement changing the name of target - like <name>.

I also cannot use simple rename post build step, as the Application must be linked to libAuthorization.Plugin.so, not libAuthorization_Plugin.so. But if something else is possible, I could use it as well.

The build process itself runs under Linux using gcc.

هل كانت مفيدة؟

المحلول

For any complex naming schemes you can use the <tag> feature. For your purpose it could look like this:

import regex ;
import type ;

rule at-to-dot ( name : type : property-set )
{
    local name = [ regex.replace $(name) @ . ] ;
    local ext = [ type.generated-target-suffix $(type) : $(property-set) ] ;
    return $(name).$(ext) ;
}

lib Auhorization@Plugin : bbb.cpp : <tag>@at-to-dot ;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top