Skip to content

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

@feedhandler

Description

@feedhandler

(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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions