A way to set language specific shared compile flags
I wanted to polish the cmake-d thirdparty support for the D programming language. The compiler (LDC2 at least) seems to require a -shared
parameter when compiling the object files for shared libraries. There only appears to be one CMAKE_<LANG>_COMPILE_OBJECT
I can set for all object files, and nothing specific for shared libraries. So what I actually want specifically is something like CMAKE_<LANG>_COMPILE_OBJECT_SHARED
, however I don't see why something more granular does not exist, or perhaps I haven't found it.
It appears that CMAKE_SHARED_LIBRARY_<LANG>_FLAGS
used to be a way to set compile flags specifically for shared libraries and modules. CMP0018 appears to be a policy change that causes this to be ignored. Though setting the policy behavior to OLD doesn't seem to have any effect as far as I can tell. Even if it did, I'd still prefer official support.