Opened 9 years ago

Closed 9 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: master
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 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by jyasskin

Attachment: ansi_first.patch added

comment:1 Changed 9 years ago by jyasskin

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 Changed 9 years ago by mloskot

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

comment:3 Changed 9 years ago by mloskot

Resolution: fixed
Status: assignedclosed

Fixed in trunk r3502 and branches/3.3 r3503

Note: See TracTickets for help on using tickets.