← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5094: Remove HINTS and stanard paths from CHOLMOD test.

 


On 24/08/10 13:30, Johannes Ring wrote:
> On Tue, Aug 24, 2010 at 2:22 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>>
>>
>> On 24/08/10 13:21, Johannes Ring wrote:
>>> On Tue, Aug 24, 2010 at 2:19 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>>>>
>>>>
>>>> On 24/08/10 13:19, Johannes Ring wrote:
>>>>> On Tue, Aug 24, 2010 at 2:14 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>>>>>>
>>>>>>
>>>>>> On 24/08/10 13:09, Johannes Ring wrote:
>>>>>>> On Tue, Aug 24, 2010 at 1:52 PM,  <noreply@xxxxxxxxxxxxx> wrote:
>>>>>>>> ------------------------------------------------------------
>>>>>>>> revno: 5094
>>>>>>>> committer: Garth N. Wells <gnw20@xxxxxxxxx>
>>>>>>>> branch nick: dolfin-cmake
>>>>>>>> timestamp: Tue 2010-08-24 12:48:37 +0100
>>>>>>>> message:
>>>>>>>>  Remove HINTS and stanard paths from CHOLMOD test.
>>>>>>>
>>>>>>> This doesn't allow me to do
>>>>>>>
>>>>>>>   cmake -DCHOLMOD_DIR=/path/to/cholmod ..
>>>>>>>
>>>>>>> which I like better than defining environment variables before running
>>>>>>> cmake. Can't we allow both?
>>>>>>>
>>>>>>
>>>>>> I removed 'HINTS' because the CMake docs advise against this type of
>>>>>> usage (they say HINTS should be used as a helper based on something else
>>>>>> which has been discovered, e.g. an include dir).
>>>>>
>>>>> Ok.
>>>>>
>>>>>> I expect that there's another way to point CMake in the right direction.
>>>>>
>>>>> Yes, ${CHOLMOD_DIR} (in addition to $ENV{CHOLMOD_DIR}) can be added to
>>>>> PATH in find_library (or find_path). Is it okay to do that?
>>>>>
>>>>
>>>> Looks good to me. We should to it for all the packages.
>>>
>>> Ok, I'll do that.
>>>
>>
>> I guess ${CHOLMOD_DIR} should come before $ENV{CHOLMOD_DIR} (priority
>> for the command line argument)?
> 
> What about PATH_SUFFIXES? Is there a reason for not using that? 

I took that approach that we either tell CMake where something is
(${CHOLMOD_DIR}/lib) or we let CMake find it (since it knows the default
location on various platforms. I think it's better to use suffix only
when it's needed, like in the case of atlas (on quite a few systems the
atlas lib is in /usr/lib/atlas). By adding 'lib' as a suffix, we're
telling CMake to look in /usr/lib/lib, /usr/lib64/lib,
/usr/local/lib/lib, etc, which is a bit silly.

Garth

> I
> think it looks better to use
> 
> find_library(COLAMD_LIBRARY colamd
>   PATHS ${CHOLMOD_DIR} ${COLAMD_DIR} $ENV{CHOLMOD_DIR} $ENV{COLAMD_DIR}
>   PATH_SUFFIXES lib
>   DOC "The COLAMD library"
>   )
> 
> rather than
> 
> find_library(COLAMD_LIBRARY colamd
>   PATHS ${CHOLMOD_DIR}/lib ${COLAMD_DIR}/lib $ENV{CHOLMOD_DIR}/lib
> $ENV{COLAMD_DIR}/lib
>   DOC "The COLAMD library"
>   )
> 
> Johannes



References