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

"Sample sconscript file" in README.md doesn't work #33

Open
feedhandler opened this issue Oct 24, 2017 · 0 comments
Open

"Sample sconscript file" in README.md doesn't work #33

feedhandler opened this issue Oct 24, 2017 · 0 comments

Comments

@feedhandler
Copy link

feedhandler commented Oct 24, 2017

(Minor documentation issue)

The "Sample sconscript file" in the README.md doesn't work, it gives an error like this in any build with more than one variant:

cuppa: __init__: [error] Cuppa terminated by exception [UserError: Two environments with different actions were specified for the same target: /home/dmsdev/repo/timm/traxFix/cuppa/helloWorld/src/Main

reason is the build target (i.e. str(Source)[:-4])is the same for all variants

# Build all *.cpp source files as executables
for Source in env.GlobFiles('*.cpp'):
    env.Build( str(Source)[:-4], Source )

It needs to be something like this:

# Build all *.cpp source files as executables
for Source in env.GlobFiles('*.cpp'):
  env.Build(env.TargetFrom(Source), Source)
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

2 participants