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
Thank you for making this large collection of very useful libraries available.
I'm offering my users the ability to link my MIT licensed code to cholmod using cmake. For this purpose it is sometimes necessary to use CHOLMOD in LGPL mode, i.e. no supernodal, cuda etc. Otherwise the combined code becomes GPL, which is in some cases too restrictive. This means I'd like to build in a safety feature in my compilation process that requires the user to explicitly and knowingly enable the GPL features of CHOLMOD, or otherwise only allow linking to the LGPL version.
To do this in cmake I require a way to detect how CHOLMOD was compiled. However, the compile definitions are not carried over to the installed target as add_compile_definitions(NGPL) etc are used. Would it be possible to use something like target_compile_definitions(CHOLMOD PUBLIC NGPL) instead (also for NSUPERNODAL), similar to how it is currently done for CHOLMOD_HAS_CUDA. I believe this then should carry over to the cmake installed target. This would then automatically enable the #ifdef features in cholmod.h as well.
Or is there perhaps another way to achieve what I need?
The text was updated successfully, but these errors were encountered:
That would be a good idea to add. I could use cmake to configure cholmod.h with #define's that can be used to determine which modules are installed, and whether or not an GPL modules are installed. That would be better than adding target_compile_definitions in cmake.
I could also add a user-callable function that returns true/false for any module, to query if it is installed, and true/false if any GPL modules are installed.
That would be great. With this I can probably use some preprocessor directives to throw a compile time error if there is a problem with the licensing situation. Thank you for having a look at this.
mmuetzel
added a commit
to mmuetzel/SuiteSparse
that referenced
this issue
Apr 17, 2024
Some preprocessor flags that are conditionally set by the build rules of
CHOLMOD affect which symbols are exported from the built libraries.
Add the preprocessor flags that are used to guard function declarations
in `cholmod.h` to the CMake targets and the pkg-config file. That way
consumers of the library get only those declarations that are actually
exported from the library when including `cholmod.h` in their code.
FixesDrTimothyAldenDavis#794.
Thank you for making this large collection of very useful libraries available.
I'm offering my users the ability to link my MIT licensed code to cholmod using cmake. For this purpose it is sometimes necessary to use CHOLMOD in LGPL mode, i.e. no supernodal, cuda etc. Otherwise the combined code becomes GPL, which is in some cases too restrictive. This means I'd like to build in a safety feature in my compilation process that requires the user to explicitly and knowingly enable the GPL features of CHOLMOD, or otherwise only allow linking to the LGPL version.
To do this in cmake I require a way to detect how CHOLMOD was compiled. However, the compile definitions are not carried over to the installed target as
add_compile_definitions(NGPL)
etc are used. Would it be possible to use something liketarget_compile_definitions(CHOLMOD PUBLIC NGPL)
instead (also for NSUPERNODAL), similar to how it is currently done forCHOLMOD_HAS_CUDA
. I believe this then should carry over to the cmake installed target. This would then automatically enable the #ifdef features in cholmod.h as well.Or is there perhaps another way to achieve what I need?
The text was updated successfully, but these errors were encountered: