diff options
author | Adriaan de Groot <adridg@FreeBSD.org> | 2022-05-05 22:23:35 +0000 |
---|---|---|
committer | Adriaan de Groot <adridg@FreeBSD.org> | 2022-05-05 22:45:34 +0000 |
commit | 07ebebf97e7cc575bc90b37f5d46097179201285 (patch) | |
tree | 24781abaac1335a6508c39902217bd38f5eda890 /Mk | |
parent | dd20cd05e29cb00421b72e4004327911b2ed1ec8 (diff) | |
download | ports-07ebebf97e7cc575bc90b37f5d46097179201285.tar.gz ports-07ebebf97e7cc575bc90b37f5d46097179201285.zip |
USES=cmake: be explicit about incompatibilities with ninja
Document how `USES=gmake` and `USES=emacs` are incompatible with
the default `USES=cmake` behavior of using ninja as generator.
Using a naive `USES=cmake emacs` line used to get you a strange
ninja error when ${MAKE_ARGS} is passed to it, now there is a
meaningful error message beforehand.
The linked PR examines ways to make it "just work", but that
got bogged down. Do a partial fix so it is easier to track
down next time.
PR: 251191
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/cmake.mk | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Mk/Uses/cmake.mk b/Mk/Uses/cmake.mk index a4c1edd3f0b2..eeaa2fda20f7 100644 --- a/Mk/Uses/cmake.mk +++ b/Mk/Uses/cmake.mk @@ -127,8 +127,15 @@ TEST_WRKSRC?= ${CONFIGURE_WRKSRC} # as the build.ninja file won't be where ninja expects it. . if empty(cmake_ARGS:Mnoninja) && empty(cmake_ARGS:Mrun) && empty(USES:Mfortran) . if "${CONFIGURE_WRKSRC}" == "${BUILD_WRKSRC}" && "${CONFIGURE_WRKSRC}" == "${INSTALL_WRKSRC}" +# USES=gmake sets MAKE_CMD and ninja.mk does too (it also messes with MAKEFILE and MAKE_CMD). . if ! empty(USES:Mgmake) -BROKEN= USES=gmake is incompatible with cmake's ninja-generator +BROKEN= USES=gmake is incompatible with cmake's ninja-generator (try cmake:noninja) +. endif +# USES=emacs appends EMACS=<path> to MAKE_ARGS, which then get passed to ninja. +# Since ninja doesn't support that kind of variable-setting on the command-line, +# it errors out. +. if ! empty(USES:Memacs) +BROKEN= USES=emacs is incompatible with cmake's ninja-generator (try cmake:noninja) . endif . include "${USESDIR}/ninja.mk" . endif |