Skip to content

CMakeLists.txt: include CXX in project languages only when using TBB - #519

Open
stefan-sedlak wants to merge 2 commits into
BLAKE3-team:masterfrom
stefan-sedlak:patch-1
Open

CMakeLists.txt: include CXX in project languages only when using TBB#519
stefan-sedlak wants to merge 2 commits into
BLAKE3-team:masterfrom
stefan-sedlak:patch-1

Conversation

@stefan-sedlak

Copy link
Copy Markdown

Avoids unnecessarily enabling the C++ toolchain when TBB support is disabled.

Avoids unnecessarily enabling the C++ toolchain when TBB support is disabled.
Copilot AI review requested due to automatic review settings May 15, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the C++ language enablement in the CMake build conditional on TBB being requested. Previously, project() always enabled C/CXX/ASM, which required a C++ toolchain even for pure-C builds. With this change, CXX is only enabled when BLAKE3_USE_TBB or BLAKE3_FETCH_TBB is set, and the cxx_std_20 compile feature is likewise gated on those options.

Changes:

  • Moved BLAKE3_USE_TBB / BLAKE3_FETCH_TBB options before the project() call and derived BLAKE3_LANGUAGES from them.
  • project() now uses LANGUAGES ${BLAKE3_LANGUAGES} instead of a hardcoded C CXX ASM.
  • Wrapped the cxx_std_20 target_compile_features call in a TBB-conditional block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@stefan-sedlak

Copy link
Copy Markdown
Author

Hi @BurningEnlightenment , could you please merge it? Or shall I improve something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants