debian.cmake slows down the build and should not be needed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Undecided
|
Jussi Pakkanen |
Bug Description
The Debian.cmake grabs all build flags from dpkg-buildflags. This is problematic because one of the flags is -O2, which slows down compilation. A quick test shows that simply commenting out include(
The debian.cmake file should really not be needed at all because of the following reasons:
1. when a package is built, debhelper (or whatever it is) will pass the flags directly to CMake so they are always correct
2. the CMake way of selecting between optimized and non-optimized builds is with the CMAKE_BUILD_TYPE option. Changing optimization behaviour behind the user's back is confusing.
3. If extra warning flags should be on at all times (stack protector etc), then they can be added in the same manner as --std=c++0x.
Therefore Debian.cmake should be just removed or, at the very least, there should be an option flag to enable it and by default it should be off.
Related branches
- PS Jenkins bot (community): Approve (continuous-integration)
- Thomas Voß (community): Approve
- Alan Griffiths: Approve
- Daniel van Vugt: Needs Fixing
-
Diff: 15 lines (+4/-1)1 file modifiedCMakeLists.txt (+4/-1)
Changed in mir: | |
assignee: | nobody → Jussi Pakkanen (jpakkane) |
status: | New → In Progress |
Changed in mir: | |
milestone: | none → 0.0.3 |
Changed in mir: | |
status: | Fix Committed → Fix Released |
The point here is that we want enable developers to build in an environment with a setup as similar to the package build setup as possible. On the one hand, the package build setup is in general quite sane, on the other hand we want to avoid surprises w.r.t. packaging builds failing that were difficult to reproduce on developer's machines.