Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] CGAL with -std=c++11 (and ROS?)
- Date: Mon, 25 Aug 2014 16:43:38 +0200
- Organization: GeometryFactory
From cmake doc:
http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command:set
set(<variable> <value1> ... <valueN>)
In this case <variable> is set to a semicolon separated list of values.
Try:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
Sebastien.
On 08/25/2014 03:54 PM, Gaël Ecorchard wrote:
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.