Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR REVIEW] [WiP] build-style/cmake: use ninja as default generator
Date: Sun, 31 Jan 2021 03:30:30 +0100	[thread overview]
Message-ID: <20210131023030.Rb1iLBSug_RDykU9Hw6NBSauShxm5Q18jVkiXqlAkmA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28304@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2053 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/28304#discussion_r567353558

Comment:
`configure_args+'" -G'Unix Makefiles'"` doesn't work.

> CMake Error: Could not create named generator 'Unix

I think we're better to do this instead:
```diff
diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index 6078ede1f4..26d55f527e 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -62,9 +62,10 @@ _EOF
 
 	cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
 
+	export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
 	# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
 	CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
-		cmake ${cmake_args} -GNinja ${configure_args} ${wrksrc}/${build_wrksrc}
+		cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
 
 	# Replace -isystem with -I for Qt4 and Qt5 packages
 	find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \;
diff --git a/srcpkgs/ccache/template b/srcpkgs/ccache/template
index 52e60be6fc..9f42aa4731 100644
--- a/srcpkgs/ccache/template
+++ b/srcpkgs/ccache/template
@@ -16,7 +16,7 @@ checksum=5fdc804056632d722a1182e15386696f0ea6c59cb4ab4d65a54f0b269ae86f99
 
 if [ -z "$CHROOT_READY" ]; then
 	hostmakedepends="cmake-bootstrap"
-	configure_args+=" -G'Unix Makefiles'"
+	export CMAKE_GENERATOR="Unix Makefiles"
 	make_cmd="make"
 else
 	hostmakedepends="asciidoc perl"
diff --git a/srcpkgs/cmake/template b/srcpkgs/cmake/template
index e3e59a31fb..cb351b5b75 100644
--- a/srcpkgs/cmake/template
+++ b/srcpkgs/cmake/template
@@ -17,6 +17,8 @@ homepage="https://www.cmake.org"
 distfiles="https://www.cmake.org/files/v${version%.*}/${pkgname}-${version}.tar.gz"
 checksum=7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1
 
+export CMAKE_GENERATOR="Unix Makefiles"
+
 pre_check() {
 	# use ctest of this build instead of requirig cmake to test cmake...
 	vsed -i "${wrksrc}/build/Makefile" \
```

  parent reply	other threads:[~2021-01-31  2:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 15:28 [PR PATCH] " Johnnynator
2021-01-29 15:30 ` [PR PATCH] [Updated] " Johnnynator
2021-01-29 15:40 ` ericonr
2021-01-29 15:47 ` [PR PATCH] [Updated] " Johnnynator
2021-01-30  0:32 ` [PR REVIEW] " sgn
2021-01-30  0:35 ` Johnnynator
2021-01-31  2:13 ` sgn
2021-01-31  2:16 ` sgn
2021-01-31  2:30 ` sgn [this message]
2021-01-31  2:32 ` ericonr
2021-01-31  2:46 ` ericonr
2021-01-31  2:47 ` ericonr
2021-02-05  9:03 ` sgn
2021-02-08 10:50 ` Johnnynator
2021-02-08 23:15 ` [PR PATCH] [Updated] " Johnnynator
2021-02-08 23:20 ` [PR PATCH] [Closed]: " Johnnynator

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=20210131023030.Rb1iLBSug_RDykU9Hw6NBSauShxm5Q18jVkiXqlAkmA@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).