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 SConsDeps generator #14713

Merged
merged 13 commits into from
Sep 13, 2023
Merged

Add SConsDeps generator #14713

merged 13 commits into from
Sep 13, 2023

Conversation

czoido
Copy link
Contributor

@czoido czoido commented Sep 11, 2023

Changelog: Feature: Add SConsDeps generator.
Docs: conan-io/docs#3371

Related to: #14717

Functional tests only for Linux

@czoido czoido added this to the 1.61 milestone Sep 11, 2023
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

conan/tools/scons/sconsdeps.py Outdated Show resolved Hide resolved
},
{% if dep_version is not none %}"{{dep_name}}_version" : "{{dep_version}}",{% endif %}
""")
sections = ["conan = {\n"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't the section called conandeps? (to account for a potential conantoolchain)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, as it is is this:

# SConscript_conandeps generated by conan
conan = {
        # this one aggregates all libs
        "conandeps" : {
            "CPPPATH" ...
        },
        
        # now separate libs
        "zlib" : {
            "CPPPATH" ...
        },
        "zlib_version" ...
        ...

loaded like this in the SConscript:

# SConscript by the consumer
conan = SConscript('./SConscript_conandeps')
flags = conan["conandeps"]
env.MergeFlags(flags)

Maybe we can do:

conandeps = {
        # this one aggregates all libs
        "conanlibs" : { # all_libs? aggregated_libs?...
            "CPPPATH" ...
        },
        ...

then:

conan = SConscript('./SConscript_conandeps')
flags = conandeps["conanlibs"]
env.MergeFlags(flags)

Something like that?

@czoido czoido merged commit e0f2801 into conan-io:develop Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants