Bug 290583 - Mk/Uses/cmake.mk: Rename CMAKE_TESTING_PARALLEL_LEVEL to CMAKE_TESTING_JOBS
Summary: Mk/Uses/cmake.mk: Rename CMAKE_TESTING_PARALLEL_LEVEL to CMAKE_TESTING_JOBS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-27 19:34 UTC by Po-Chuan Hsieh
Modified: 2025-11-11 05:50 UTC (History)
3 users (show)

See Also:
jhale: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Po-Chuan Hsieh freebsd_committer freebsd_triage 2025-10-27 19:34:00 UTC
Patch is available at https://people.FreeBSD.org/~sunpoet/patch/Mk-Uses-cmake.mk.txt

Instead of using _PARALLEL_LEVEL suffix from cmake upstream, use _JOBS to align with MAKE_JOBS used in the ports tree.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2025-10-29 01:10:12 UTC
It's not fully equvalent to jobs so that's why it wasn't named like that in the first place so this is a not a good option and can lead to unintended results.

Addtionally this was already suggested in a previous PR and not accepted, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279316
Comment 2 Jason E. Hale freebsd_committer freebsd_triage 2025-10-31 08:33:02 UTC
(In reply to Daniel Engberg from comment #1)
Daniel, you have a valid point that the '-j' flag in ctest(1) functions differently than that of bmake(1), gmake(1), or ninja. The ports system, however, really expects MAKE_JOBS_NUMBER to be a positive nonzero integer and does absolutely nothing to check the sanity of this user-settable value.

For example, bmake allows the -j flag to be a floating point or end in 'C' per the manpage, and ports that just use bmake will build with rather bizarre strings in /etc/make.conf like 'MAKE_JOBS_NUMBER=3.14159_gimme_some_pi'. *dog in burning house - this is fine - meme*

Build systems like gmake or ninja would bark and bite at such a declaration. Since meta build systems like CMake and meson use ninja by default, they would also crap out. *qmake quietly chuckles to itself*

That said, I'm more inclined to agree with sunpoet. This variable, however it is called, should be documented in Mk/Uses/cmake.mk, though.
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-11-09 16:44:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=43a48347abe7d89353ff0c9be56eb829ca8819aa

commit 43a48347abe7d89353ff0c9be56eb829ca8819aa
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-11-09 16:28:16 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-11-09 16:32:44 +0000

    Mk/Uses/cmake.mk: Rename CMAKE_TESTING_PARALLEL_LEVEL to CMAKE_TESTING_JOBS

    PR:             290583
    Approved by:    jhale

 Mk/Uses/cmake.mk            | 8 ++++----
 chinese/libchewing/Makefile | 2 +-
 security/mbedtls3/Makefile  | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2025-11-11 05:50:59 UTC
Committed. Thanks.