coin-or / CppAD

A C++ Algorithmic Differentiation Package: Home Page
https://cppad.readthedocs.io
Other
446 stars 94 forks source link

Static library for non-windows builds #184

Closed fontanf closed 10 months ago

fontanf commented 10 months ago

Hi,

Currently, when compiling on a non-windows OS, only a dynamic library is generated. Could it be possible to generate a static library as well? or at least to have an option to do so? I tried to manually change SET(is_cppad_lib_dynamic 1) to SET(is_cppad_lib_dynamic 0) and the compilation generated a static library as expected, but I haven't tested it.

bradbell commented 10 months ago

See that heading 09-08 on https://cppad.readthedocs.io/en/latest/whats_new_23.html#whats-new-23-mm-dd-09-08

Please test that the new cmake option -D cppad_static_lib=true works for you. If so, please close this issue.

Thanks.

fontanf commented 10 months ago

It works. Thank you for the fast update!