<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>Yes I am aware and i can reset and such. 
<div>This is about the why, not the how. The config file has nothing to do with the petsc build system, it is for users of petsc, like a .pc file (pkgconfig).</div>
<div><br>
</div>
<div>The code in question builds a number of convenience libraries for shared code between multiple apps. I want these static at times but in general shared for installs. This I control using the intended cmake mechanism - namely the BUILD_SHARED_LIBS variable.
 Petsc breaks this since it overrides the value passed by the user.</div>
<div><br>
</div>
<div>I would rather avoid hacking my buildsystem to workaround petsc bugs. Right now i need to deploy a patched petsc everywhere for this reason - to remove the useless variable writing in the cmake config file. Because as you say shared libs should normally
 be used.</div>
<br>
<br>
-------- Opprinnelig melding --------<br>
Fra: Satish Balay <balay@mcs.anl.gov> <br>
Dato: 13.10.2015 16.56 (GMT+01:00) <br>
Til: Arne Morten Kvarving <Arne.Morten.Kvarving@sintef.no> <br>
Ko: petsc-users@mcs.anl.gov <br>
Emne: Re: [petsc-users] petsc cmake config - BUILD_SHARED_LIBS <br>
<br>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Well the current code has the option of building petsc via cmake [but<br>
this mode is deprecated - and the default build uses straight gnumake]<br>
<br>
So if you configure PETSc with --shared-libraries=1 [default] - this<br>
flag is set in conf/PETScConfig.cmake<br>
<br>
So you can rebuild petc with --shared-libraries=0 - and this flag will<br>
go away.<br>
<br>
BTW: I'm not sure why this affects your application. [as applications<br>
don't build libraries]. Or is it that you have a library that builds<br>
over PETSc?<br>
<br>
[in this case - it generally makes sense to build it as shared anyway]<br>
<br>
Also - I'm guessing - there must be a way for you to reset this variable in<br>
your cmake config - if thats whats requred by your app.<br>
<br>
Jed should be able to confirm..<br>
<br>
Satish<br>
<br>
<br>
On Tue, 13 Oct 2015, Arne Morten Kvarving wrote:<br>
<br>
> hi there;<br>
> <br>
> why does the cmake config file set the BUILD_SHARED_LIBS variable? this<br>
> affects all buildsystem where the config file is included, and has 0 effect on<br>
> the actual petsc side of things.<br>
> <br>
> i don't see why petsc should decided whether i want to use static libraries in<br>
> my application or not.<br>
> i can keep hacking around it, or supply a patch to get rid of it. but i<br>
> figured i'd ask for the reasoning first.<br>
> <br>
> if this should have gone to -dev, i'm sorry. i thought it fit better here.<br>
> <br>
> arnem<br>
> <br>
> <br>
<br>
</div>
</span></font>
</body>
</html>