Opened 13 years ago

Closed 13 years ago

#489 closed defect (fixed)

CMAKE_CXX_FLAGS overrides -std=gnu++0x

Reported by: jyasskin Owned by: mloskot
Priority: minor Milestone: 3.3.2
Component: Default Version: main
Severity: Unassigned Keywords: cmake
Cc:

Description

I was trying to fix some problems in geos when building in C++0x mode, and I discovered that CMakeLists.txt puts -ansi after my custom build flags, overriding the -std setting. Here's a patch that fixes this.

Attachments (1)

ansi_first.patch (436 bytes ) - added by jyasskin 13 years ago.

Download all attachments as: .zip

Change History (4)

by jyasskin, 13 years ago

Attachment: ansi_first.patch added

comment:1 by jyasskin, 13 years ago

Of course, you intended to override _gnu_++0x and change it to c++0x, but -ansi means -std=c++98 (http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/C-Dialect-Options.html), so it overrides -std=c++0x too.

comment:2 by mloskot, 13 years ago

Keywords: cmake added
Owner: changed from geos-devel@… to mloskot
Status: newassigned

comment:3 by mloskot, 13 years ago

Resolution: fixed
Status: assignedclosed

Fixed in trunk r3502 and branches/3.3 r3503

Note: See TracTickets for help on using tickets.