Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Weird cmake side-effect when including CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Weird cmake side-effect when including CGAL


Chronological Thread 
  • From: David Coeurjolly <>
  • To:
  • Subject: Re: [cgal-discuss] Weird cmake side-effect when including CGAL
  • Date: Thu, 12 Sep 2013 12:58:12 +0200


Le 12 sept. 2013 à 11:58, "Laurent Rineau (CGAL/GeometryFactory)"
<>
a écrit :

> Le jeudi 12 septembre 2013 11:13:31 David Coeurjolly a écrit :
>> Re,
>>
>> I've found what was wrong and maybe something should be done in CGAL cmake
>> scripts: In fact, all my includes use the CMAKE_MODULE_PATH variable I've
>> specified for my project (and not relative explicit paths
>> "cmake/xxx.cmake").
>>
>> When doing a
>>
>> INCLUDE( ${CGAL_USE_FILE} )
>>
>> CGAL overwrites the CMAKE_MODULE_PATH variable which may cause problems for
>> further cmake scripts includes.
>>
>> To fix my problem, I've just had to reset the CMAKE_MODULE_PATH after the
>> CGAL_USE_FILE include.
>>
>> Maybe the USE_FILE could backup this variable and reset it when all CGAL
>> related scripts have been interpreted...
>>
>> (I'm using last CGAL / cmake releases)
>
> Which CGAL version do you use? That might help us understanding what
> happens.
>
> The inclusion of ${CGAL_USE_FILE} should not overwrite CMAKE_MODULE_PATH
> but
> only append something to it. Are you sure the old value of
> CMAKE_MODULE_PATH
> is completely removed?
>


Well, you're right... ${CGAL_USE_FILE} appends the path to CGAL modules.. The
problem comes from me since I was using the CMAKE_MODULE_PATH as a variable
(and not list):

INCLUDE(${CMAKE_MODULE_PATH}/ChechSomething.cmake)

(and surprisingly, cmake (2.8.11.2) does not report a fatal error).

Replacing my code by simply

INCLUDE(ChechSomething)

Solve the issue without manually resetting the variable.

regards
dav





Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.18.

Top of Page