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" \ ```