You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the short term, it may be easiest to just initialize the module linker flags to the same values as the shared linker flags in the CMakeToolchain generator, similar to what I've done here: a2a8d41
Longer-term, it would be nice to have a separate config option similar to tools.build:sharedlinkflags and tools.build:exelinkflags.
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
The thing is that MODULE package types are not explicitly defined in Conan yet.
I think it would make sense to add them to the model, though this is not a very straightforward thing, it needs to be done carefully, as it affects a lot of aspects in the traits propagation, computation of the package_id, etc.
Supporting CMAKE_MODULE_LINKER_FLAGS would come after the basic modeling is there, it is possible that defining new cpp_info.modulelinkerflags would also be necessary.
Lets try to start working on this, it might take some time to cover all the steps, but I think it would be a good feature for Conan.
Thanks! I'm currently using the workaround below (just to get the module to link correctly), but it would be nice to have plugin support in the Conan package model as you described.
What is your suggestion?
Conan currently only supports
CMAKE_SHARED_LINKER_FLAGS
andCMAKE_EXE_LINKER_FLAGS
, but lacks support forCMAKE_MODULE_LINKER_FLAGS
. This causes issues when building e.g. Python extension modules and other plugins (any target created usingadd_library(tgt MODULE)
). When a profile (or Conan itself) sets any shared linker flags, these are not applied to module targets.In the short term, it may be easiest to just initialize the module linker flags to the same values as the shared linker flags in the CMakeToolchain generator, similar to what I've done here: a2a8d41
Longer-term, it would be nice to have a separate config option similar to
tools.build:sharedlinkflags
andtools.build:exelinkflags
.Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: