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 )
- 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)
Change History (10)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
comment:3 follow-up: 6 Changed 14 years ago by
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
Attachment: | 4bc24dc30565.patch added |
---|
comment:4 follow-up: 5 Changed 14 years ago by
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 Changed 14 years ago by
Component: | core → build system |
---|---|
Owner: | changed from Alpar Juttner to Akos Ladanyi |
Type: | defect → enhancement |
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 Changed 14 years ago by
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
Attachment: | 16a62b1bedb9.patch added |
---|
comment:7 Changed 14 years ago by
[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
Resolution: | → done |
---|---|
Status: | new → closed |
The changes in this ticket are in the main branch as [659ba4805a48] and [63e4468c680e].
So CMake should use the same defaults as we customized autotools?