[petsc-users] petsc cmake config - BUILD_SHARED_LIBS

Satish Balay balay at mcs.anl.gov
Tue Oct 13 09:56:25 CDT 2015


Well the current code has the option of building petsc via cmake [but
this mode is deprecated - and the default build uses straight gnumake]

So if you configure PETSc with --shared-libraries=1 [default] - this
flag is set in conf/PETScConfig.cmake

So you can rebuild petc with --shared-libraries=0 - and this flag will
go away.

BTW: I'm not sure why this affects your application. [as applications
don't build libraries]. Or is it that you have a library that builds
over PETSc?

[in this case - it generally makes sense to build it as shared anyway]

Also - I'm guessing - there must be a way for you to reset this variable in
your cmake config - if thats whats requred by your app.

Jed should be able to confirm..

Satish


On Tue, 13 Oct 2015, Arne Morten Kvarving wrote:

> hi there;
> 
> why does the cmake config file set the BUILD_SHARED_LIBS variable? this
> affects all buildsystem where the config file is included, and has 0 effect on
> the actual petsc side of things.
> 
> i don't see why petsc should decided whether i want to use static libraries in
> my application or not.
> i can keep hacking around it, or supply a patch to get rid of it. but i
> figured i'd ask for the reasoning first.
> 
> if this should have gone to -dev, i'm sorry. i thought it fit better here.
> 
> arnem
> 
> 



More information about the petsc-users mailing list