COIN-OR::LEMON - Graph Library

Opened 14 years ago

Closed 14 years ago

#390 closed enhancement (done)

Different compilation flags using CMAKE vs. Autotools

Reported by: Alpar Juttner Owned by: Akos Ladanyi
Priority: major Milestone: LEMON 1.3 release
Component: build system Version: hg main
Keywords: Cc:
Revision id:

Description (last modified by Alpar Juttner)

  • Autotool uses -g -O2 + a huge set of warning flags by default.
  • Using scripts/bootstrap.sh, we have a choice to optimize or not (-O2 vs. nothing). This script uses -ggdb instead of -g (not a big diffenerce) and the same warning options.
  • The CMAKE environment uses
    • no warning flags at all!!!
    • one of the following debug/optimization settings
      • -g (DEBUG mode),
      • -Os -DNDEBUG (MINRELSIZE mode),
      • -O2 -g (RELWITHDEBINFO mode), or
      • -O3 -DNDEBUG (RELEASE mode)

Attachments (2)

4bc24dc30565.patch (2.1 KB) - added by Alpar Juttner 14 years ago.
16a62b1bedb9.patch (3.2 KB) - added by Alpar Juttner 14 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 14 years ago by Alpar Juttner

Description: modified (diff)

comment:2 Changed 14 years ago by Akos Ladanyi

So CMake should use the same defaults as we customized autotools?

comment:3 Changed 14 years ago by Alpar Juttner

Currently, configure.ac sets the following warning flags.

"-Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"

What is the reason for the duplicated -Wall -W?

Changed 14 years ago by Alpar Juttner

Attachment: 4bc24dc30565.patch added

comment:4 Changed 14 years ago by Alpar Juttner

4bc24dc30565.patch should be applied on the top of the patches in tickets in #388 ans #389.

  • It sets CMAKE_BUILD_TYPE to 'Release' by deafult
  • Defines editable variable LEMON_CXX_WARNING_FLAGS, which is passed to the compiler along with the other compilation flags. Its default value is architecture dependent.

comment:5 in reply to:  4 Changed 14 years ago by Alpar Juttner

Component: corebuild system
Owner: changed from Alpar Juttner to Akos Ladanyi
Type: defectenhancement

Replying to alpar:

4bc24dc30565.patch should be applied on the top of the patches in tickets in #388 ans #389.

  • It sets CMAKE_BUILD_TYPE to 'Release' by deafult
  • Defines editable variable LEMON_CXX_WARNING_FLAGS, which is passed to the compiler along with the other compilation flags. Its default value is architecture dependent.

comment:6 in reply to:  3 Changed 14 years ago by Akos Ladanyi

Replying to alpar:

What is the reason for the duplicated -Wall -W?

I've asked myself the same question every time I saw it.

Changed 14 years ago by Alpar Juttner

Attachment: 16a62b1bedb9.patch added

comment:7 Changed 14 years ago by Alpar Juttner

[16a62b1bedb9.patch] implements a new build type called 'Maintainter'. It should be applied on top of [4bc24dc30565]. See the commit log for more details.

comment:8 Changed 14 years ago by Alpar Juttner

Resolution: done
Status: newclosed

The changes in this ticket are in the main branch as [659ba4805a48] and [63e4468c680e].

Note: See TracTickets for help on using tickets.