Skip to content

Commit

Permalink
buildtypes: Set default for cmake build type
Browse files Browse the repository at this point in the history
cmake, by default, uses CMAKE_BULD_TYPE=Debug with implies '-O0'. This
has a severe performance impact for most software. Let bee use
CMAKE_BULD_TYPE=RelWithDebInfo by default, which implies '-O2'.

For most software, the difference between '-O2' and '-O3' is
neglectable. Bee packages with special performance considerations, for
example zlib, might use -DCMAKE_BUILD_TYPE=Release in their bee file to
force '-O3'.
  • Loading branch information
donald committed Nov 21, 2023
1 parent 3090258 commit 5cc3440
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions buildtypes/cmake.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ bee_configure() {
-DCMAKE_INSTALL_LIBDIR=${LIBDIR} \
-DCMAKE_COLOR_MAKEFILE=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
"${@}" \
${BEE_BUILDTYPE_CMAKE_SOURCEDIR}
}
Expand Down

0 comments on commit 5cc3440

Please sign in to comment.