Skip to content

Conversation

memsharded
Copy link
Member

Changelog: (Feature | Fix | Bugfix): Describe here your pull request
Docs: https://github.com/conan-io/docs/pull/XXXX

Close #18613

@memsharded
Copy link
Member Author

A ConanCenter recipe would look like:

            #if is_msvc(self):
                # Required for the __cplusplus check at
                # https://github.com/DCMTK/dcmtk/blob/DCMTK-3.6.8/config/include/dcmtk/config/osconfig.h.in#L1489
            #    self.cpp_info.components[target_lib].cxxflags.append("/Zc:__cplusplus")
            def myflags(consumer):
                if consumer.settings.get_safe("compiler") == "msvc":
                    return ["/Zc:__cplusplus"]
            self.cpp_info.components[target_lib].cxxflags = myflags

@memsharded
Copy link
Member Author

With new changes, the recipe in ConanCenter could be just:

self.cpp_info.cxxflags = lambda c: ["/Zc:__cplusplus"] if is_msvc(c) else []

And fully transparent to the consumers

@memsharded memsharded added this to the 2.22.0 milestone Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feedback] compatibility can't handle cpp_info cxxflags
2 participants