CGAL on Windows: Problems with Boost and cmake

680 views Asked by At

I've been trying to build CGAL using cmake-gui for quite a while now but I keep getting the same error. In CmakeError.log I get entries of the sort:

fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "boost/variant.hpp": No such file or directory

(Datei kann nicht geöffnet werden = File can not be opened)

It seems like the boost include directory could not be found, but I am sure I did everything I have to:

1) Installed boost_1_58_0-msvc-12.0-64.exe to C:\boost_1_58_0
2) Installed CGAL-4.6.zip to C:\CGAL-4.6
3) Made sure that environment-variables BOOST_INCLUDEDIR and BOOST_LIBRARYDIR are set to C:\boost_1_58_0\ and C:\boost_1_58_0\lib64-msvc-12.0 respectively
4) Opened cmake-gui in the CGAL directory
5) Chose "Visual Studio 12 2013 Win64" as Compiler, then clicked on Configure.

Cmake then clearly found the Boost installation:

Boost version: 1.58.0
Found the following Boost libraries:
  thread
  system
Boost include:     C:/boost_1_58_0
Boost libraries:   optimized;C:/boost_1_58_0/lib64-msvc-12.0/boost_thread-    vc120-mt-1_58.lib;debug;C:/boost_1_58_0/lib64-msvc-12.0/boost_thread-vc120-mt-gd-1_58.lib;optimized;C:/boost_1_58_0/lib64-msvc-12.0/boost_system-vc120-mt-1_58.lib;debug;C:/boost_1_58_0/lib64-msvc-12.0/boost_system-vc120-mt-gd-1_58.lib
Boost definitions: 
USING BOOST_VERSION = '1.58.0'

But to no avail, when Cmake compiles CGAL it seems like it's not able to access the Boost includes. In addition to the above steps I also tried the following:

1) Add a BOOST_ROOT variable to cmake-gui, pointing to C:/boost_1_58_0.
2) Checked "Advanced" in cmake-gui and checked the Boost_INCLUDE_DIR variable. It's set to C:/boost_1_58_0
3) I altered the Variable's input to C:/boost_1_58_0/boost
4) Set CGAL_Boost_USE_STATIC_LIBS to 1

Nothing helped. Help!

1

There are 1 answers

5
dineri On BEST ANSWER

Trying lots of different configuration/software version/compiler combinations I was able to track down the source of the problem: it was cmake itself. At least in its most current version.

I downgraded to CMake version 3.1.3, and it worked.

Edit by Laurent Rineau (release manager of CGAL): Indeed the CMake scripts in CGAL-4.6 are not compatible with CMake-3.3rc2. CGAL developers discovered that bug coincidentally four days ago, and it is already fixed in CGAL-4.6.1. CGAL-4.6.1 will be published today (2015/06/26), or maybe on Monday 2015/06/29.