Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target type that will only transit configuration to dependent targets #33

Open
ethouris opened this issue Nov 6, 2024 · 0 comments

Comments

@ethouris
Copy link
Owner

ethouris commented Nov 6, 2024

This can be either a new target type "config", which will mean only to transit configuration (at the time of writing it, still a pending feature). The goal of this definition is to integrate settings that will be applied to the dependent target. Example

ag settings -type config -defines TEST=2 -ldflags {+ -lm}
ag goal -type program -sources runner.cc global.cc -depends settings

Should result in the following commands in Makefile.tcl:

rule runner.ag.o runner.cc {
       g++ -o runner.ag.o runner.cc -DTEST=2
}

...

rule goal runner.ag.o global.ag.o {
      g++ -o goal runner.ag.o global.ag.o -lm
}

IMPORTANT! The config-type object need not be the same as virtual library because virtual library (see #79) may have its own distinct settings; making a target dependent on a virtual library makes only sources to be added to the source list of the given target, but not to spread the settings (sources that belong to the virtual library may use their distinct settings; the "config" type target can help here keep common settings for a virtual library and the dependent target).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant