link error

Yixun Liu enjoywm at cs.wm.edu
Thu Feb 12 08:00:13 CST 2009


Jed Brown wrote:
> On Wed 2009-02-11 22:35, Satish Balay wrote:
>   
>> Don't know cmake.
>>
>> You'll have to make sure 'all' compiler options used to compile the
>> PETSc example are also used in your build system. If you miss
>> something - you'll have to go back - and add it in.
>>
>> So:
>>
>> - look at the make output of compiling a PETSc example
>> - look at the make output from compiling your code.
>> - look for whats missing - and add it to your cmake stuff..
>>     
>
> Yixun, please have a look at my FindPETSc.cmake module at
>
>   http://github.com/jedbrown/cmake-modules
>
> It should do the right thing with both shared and static libs.  Let me
> know if you have any trouble with it.
>
> Jed
>   
Thanks. Satish's method works. I add X11 to CMakeList.txt and it is ok. 
I also want to try  Jed's method to simplify the configuration. I
download FindPetsc.cmake and I think I need add something like,

FIND_PACKAGE (PETSC)

into CMakeList. Right?

Q1. Where should I put FindPetsc.cmake?
Q2. in my application there are a lot of CMakeList.txt distributed in
different directories. Which one should I use?


More information about the petsc-users mailing list