From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 13801] New: toolchainfile.cmake hardcodes CMAKE_BUILD_TYPE
Date: Wed, 12 May 2021 08:41:59 +0000 [thread overview]
Message-ID: <bug-13801-163@https.bugs.busybox.net/> (raw)
https://bugs.busybox.net/show_bug.cgi?id=13801
Bug ID: 13801
Summary: toolchainfile.cmake hardcodes CMAKE_BUILD_TYPE
Product: buildroot
Version: 2021.02.1
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: christian.morales.vega at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
The toolchainfile.cmake file created by Buildroot says things like "# This
toolchain file can be used both inside and outside Buildroot.". But it's not
really friendly to outside Buildroot users since it hardcodes CMAKE_BUILD_TYPE.
cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel
-DCMAKE_TOOLCHAIN_FILE=toolchainfile.cmake should use MinSizeRel, not Debug or
Release. Maybe I want to debug my software and want to build it with Debug
CMAKE_BUILD_TYPE even if the rest of Buildroot has been built with Release.
I'm not even sure how much sense it makes to make it Debug or Release based on
BR2_ENABLE_DEBUG
(https://git.busybox.net/buildroot/tree/package/pkg-cmake.mk?id=8036c23d5964cf924d8857cf1a8f711404458950#n269).
BR2_ENABLE_DEBUG is described as "Build packages with debugging symbols
enabled", i.e. it's only effect is supposed to be to add "-g". But by using the
Debug CMAKE_BUILD_TYPE God knows what a specific package will do: it may enable
extra logging, use a way slower algorithm to do some task...
In any case I would argue
https://git.busybox.net/buildroot/tree/package/pkg-cmake.mk?id=8036c23d5964cf924d8857cf1a8f711404458950#n94
is a better place to set a __default__ CMAKE_BUILD_TYPE. Outside Buildroot user
should not be seeing it.
--
You are receiving this mail because:
You are on the CC list for the bug.
next reply other threads:[~2021-05-12 8:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 8:41 bugzilla at busybox.net [this message]
2021-05-12 10:14 ` [Buildroot] [Bug 13801] toolchainfile.cmake CMAKE_BUILD_TYPE bugzilla at busybox.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-13801-163@https.bugs.busybox.net/ \
--to=bugzilla@busybox.net \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.