Skip to content

require cmake on all platforms; tbb is always enabled - #275

Merged
kevinushey merged 1 commit into
masterfrom
feature/require-cmake
Jul 28, 2026
Merged

kevinushey merged 1 commit into
masterfrom
feature/require-cmake

Conversation

@kevinushey

Copy link
Copy Markdown
Contributor

DESCRIPTION has always declared SystemRequirements: CMake (>= 3.5), and a
missing cmake was already fatal everywhere except Windows -- where it instead
produced a package with no TBB backend at all. That was easy to end up with and
hard to notice: the install succeeded, and the only symptom was RcppParallel
quietly running everything on tinythread.

This treats it as the unmet system requirement it is and fails the install.

TBB_ENABLED is then always TRUE, which makes several branches unreachable,
so they are dropped:

  • the Windows "building without a tbb backend" notice in configure.R, and its
    counterpart in install.libs.R
  • the NULL pkgLibs branch for "no TBB to link at all"
  • the TBB_ENABLED = FALSE / -DRCPP_PARALLEL_USE_TBB=0 configuration

The tinythread backend is unaffected as a runtime choice -- it is still
selectable via RCPP_PARALLEL_BACKEND=tinythread. It simply is no longer
something a build can silently land on.

Testing

  • all 12 test files pass on macOS

  • verified the failure path end to end, with the user profile suppressed and
    cmake off the PATH:

    error: RcppParallel requires cmake (>= 3.5); cmake was not found
    ERROR: configuration failed for package 'RcppParallel'
    
  • verified all three diagnostic variants (not found / unparseable version / too
    old) select correctly

Note

This was written on top of #274 but pushed after that PR had already been
squash-merged, so it is cherry-picked onto current master here. The diff is
identical to the commit that was on that branch.

DESCRIPTION has always declared 'SystemRequirements: CMake (>= 3.5)', and
a missing cmake was already fatal everywhere except Windows, where it
instead produced a package with no TBB backend at all. That was easy to
end up with and hard to notice: the install succeeded, and the only
symptom was RcppParallel quietly running everything on tinythread.

Treat it as the unmet system requirement it is and fail the install.
TBB_ENABLED is then always TRUE, which makes several branches
unreachable, so drop them:

- the Windows 'building without a tbb backend' notice in configure.R and
  its counterpart in install.libs.R
- the NULL pkgLibs branch for 'no TBB to link at all'
- the TBB_ENABLED = FALSE / -DRCPP_PARALLEL_USE_TBB=0 configuration

The tinythread backend is unaffected as a runtime choice: it is still
selectable via RCPP_PARALLEL_BACKEND=tinythread. It simply is no longer
something a build can silently land on.
@kevinushey
kevinushey merged commit b3eb552 into master Jul 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant