0
$\begingroup$

Rosanswers logo

I have a problem building a package using the CGAL libray on the buildfram.

The prerelease test is sucessful on both my local computer and Jenkins but I get the following error when trying to build the binary deb:

CMake Error at> /usr/lib/CGAL/CGAL_SetupFlags.cmake:65

(message): RelWithDebInfo is not a valid build type: only Release or Debug is allowed

The inclusion of CGAL in my CMakeLists.txt looks like this:

find_package(CGAL REQUIRED COMPONENTS Core)

set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE CACHE BOOL "Don't override flags")

include(${CGAL_USE_FILE})

The package name is crossing_detector. Its source is in https://github.com/lama-imr/lama_utilities/tree/indigo-devel/crossing_detector.

How can I deal with this problem?


Originally posted by galou on ROS Answers with karma: 265 on 2015-01-14

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You should be able to reproduce this locally by using:

catkin_make -DCMAKE_BUILD_TYPE=RelWithDebInfo 

Once you can do that, you can work out a solution locally before you release a new version to the farm.

My only thought about actually fixing this is to try setting the CGAL_DONT_OVERRIDE_BUILD_FLAGS variable before you call find_package(CGAL).


Originally posted by ahendrix with karma: 47576 on 2015-01-14

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by galou on 2015-01-14:
Thanks for the answer, unfortunately setting CGAL_DONT_OVERRIDE_BUILD_FLAGS before find_package didn't help. What I did is a workaround: set(CMAKE_BUILD_TYPE "Release") before and set(CMAKE_BUILD_TYPE "RelWithDebInfo") after. I don't like to play with the build type in CMakeLists.txt.

Comment by ahendrix on 2015-01-14:
I agree that setting the build type in your CMakeLists is not a good solution. You may want to consult the CGAL documentation or contact the CGAL developers, since it's their build files which are rejecting a standard CMake build type.

$\endgroup$