New: cmake BUILDDIR
https://bugs.busybox.net/show_bug.cgi?id=12191
Bug ID: 12191
Summary: cmake BUILDDIR
Product: buildroot
Version: 2019.02.5
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: harshavardhan.bokil at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
I am building a cmake package that strictly does not allow in source build, output/build/$(PKG_NAME)-$(PKG_VERSION)/buildroot-build is rejected. Suggest this change which solves the problem
package/pkg-cmake.mk +3 -3
@@ -66,9 +66,9 @@ ifeq ($$($(3)_SUPPORTS_IN_SOURCE_BUILD),YES) -$(2)_BUILDDIR = $$($(2)_SRCDIR) -else -$(2)_BUILDDIR = $$($(2)_SRCDIR)/buildroot-build +$(2)_BUILDDIR ?= $$($(2)_SRCDIR) +else +$(2)_BUILDDIR ?= $$($(2)_SRCDIR)/buildroot-build endif #
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12191] cmake BUILDDIR
https://bugs.busybox.net/show_bug.cgi?id=12191
--- Comment #1 from Thomas Petazzoni <[email protected]> --- Could you submit this as a proper patch to the mailing list, with an update to the Buildroot manual ? Thanks!
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12191] cmake BUILDDIR
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12191
Harsh Bokil <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harshavardhan.bokil at gmail.c
| |om--- Comment #2 from Harsh Bokil <[email protected]> --- Created attachment 8241
--> https://bugs.busybox.net/attachment.cgi?id=8241&action=edit
Allow custom _BUILDDIR for cmake packages
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12191] cmake BUILDDIR
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12191
--- Comment #3 from Harsh Bokil <[email protected]> --- (In reply to Thomas Petazzoni from comment #1)
Attached here.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12191] cmake BUILDDIR
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12191
--- Comment #4 from Arnout Vandecappelle <[email protected]> ---
package/pkg-cmake.mk line 72
Quoted 13 lines
package/pkg-cmake.mk +3
-3@@ -66,9 +66,9 @@ ifeq ($$($(3)_SUPPORTS_IN_SOURCE_BUILD),YES) -$(2)_BUILDDIR = $$($(2)_SRCDIR) -else -$(2)_BUILDDIR = $$($(2)_SRCDIR)/buildroot-build +$(2)_BUILDDIR ?= $$($(2)_SRCDIR) +else +$(2)_BUILDDIR ?= $$($(2)_SRCDIR)/buildroot-build endif
I am not at all happy with this approach.
First of all, it becomes unnecessary if/when the separate-source-and-build-dir series finally gets merged.
Second, the approach taken by pkg-cmake is already kind of awkward IMO; allowing individual packages to override BUILDDIR makes it worse.
Third, it breaks a couple of things, e.g. <pkg>-dirclean.
Finally, the problem is really with the package itself, there should be no reason at all to reject output/build/$(PKG_NAME)-$(PKG_VERSION)/buildroot-build as the build directory. So just patch the package and whatever check it does, replace it with a check that CMAKE_SOURCE_DIR != CMAKE_BINARY_DIR.
Failing that, I would be more in favour in advancing the separate-source-and-build-dir approach.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 12191] cmake BUILDDIR
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=12191
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED--- Comment #5 from Thomas Petazzoni <[email protected]> --- I agree that fixing the package seems like a much better option.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.