Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


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

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)

Le 10 sept. 2013 à 09:45, David Coeurjolly
<>
a écrit :

> Dear All,
>
> I'm having a strange cmake issue when including CGAL to my project. For
> short, my main CMakeLists.txt looks like:
>
> INCLUDE ("cmake/CheckCGAL.cmake")
> ...
> MESSAGE(STATUS "Ok...")
> ...
> INCLUDE ("cmake/ChecKOtherPackageA.cmake")
> INCLUDE ("cmake/ChecKOtherPackageB.cmake")
>
>
> In CheckCGAL.cmake, there are the FIND_PACKAGE(CGAL) and the dedicated
> "include( ${CGAL_USE_FILE} )". Note that there is no problem here.. CGAL is
> found and all CGAL variables are fine.
>
> In ChecKOtherPackageXXX.cmake, I have other dependency checks and plenty
> of messages..
>
> The problem: when I active the CGAL dependency, cmake refuses to include
> the remaining ChecKOtherPackageXXX.cmake files. The message "Ok..." is
> displayed but cmake skips the "include" directives.
>
> If I turn off CGAL ( "if" on a flag in the CheckCGAL), all further
> "include"(s) are fine.
>
> Have you already seen such strange behavior ?
>
> Thanks,
> david
>
> ----------------







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




Archive powered by MHonArc 2.6.18.

Top of Page