Subject: CGAL users discussion list
List archive
- From: Gaël Ecorchard <>
- To: "" <>
- Subject: [cgal-discuss] CGAL with -std=c++11 (and ROS?)
- Date: Mon, 25 Aug 2014 14:54:52 +0100
Hi community,
I have a problem compiling a ROS package with CGAL and "-std=c++11" flag. I think it's a problem with CGAL rather than ROS but I'm not sure.
Here is a minimal CMakeLists.txt to reproduce the error:
cmake_minimum_required(VERSION 2.8.3)
project(cgal_cmake_flags)
find_package(catkin REQUIRED)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} " -std=c++11")
find_package(CGAL REQUIRED COMPONENTS Core)
set(CGAL_DONT_OVERRIDE_CMAKE_FLAGS TRUE CACHE BOOL "Don't override flags")
message(CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS})
include(${CGAL_USE_FILE})message(CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS})
During the
cmake process, this line gets printed:
"-- USING CXXFLAGS = '-g -O2 -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -frounding-math;
-std=c++11 -O3 -DNDEBUG'"
You will notice the semi-colon after
-frounding-math. This causes big problems when compiling. I tried
"catkin_make -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS=TRUE" but it didn't help.
Does someone has experience setting c++11 standard and using CGAL with ROS (catkin)?
Thanks a lot,
Gaël
- [cgal-discuss] CGAL with -std=c++11 (and ROS?), Gaël Ecorchard, 08/25/2014
- Re: [cgal-discuss] CGAL with -std=c++11 (and ROS?), Sebastien Loriot (GeometryFactory), 08/25/2014
Archive powered by MHonArc 2.6.18.