Skip to content

Remove support for multiple C++ standards in the same CMake build #6573

@bernhardmgruber

Description

@bernhardmgruber

Our CMake scripts support creating targets for multiple different C++ standard versions in the same build directory. This ignores common practice of setting a single C++ standard in CMake using CMAKE_CXX_STANDARD (or CMAKE_CUDA_STANDARD), which is misleading for new comers expecting a standard CMake workflow, and incurs maintainance cost and overhead on our side, whenever we have to touch this machinery or configure builds ourselves outside presets.

Because there is no longer a need to configure for multiple C++ standards in the same build, I propose to remove this "feature" and just depend on CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.

As a starting point, this concerns at least the following cmake variables (to be removed):
CUB_ENABLE_DIALECT_CPP17
CUB_ENABLE_DIALECT_CPP20
CUB_CPP_DIALECT_OPTIONS
THRUST_CPP_DIALECT
CCCL_KNOWN_CXX_DIALECTS
cudax_CPP_DIALECT_OPTIONS
CUB_ENABLE_CPP_DIALECT_IN_NAMES

Any xxx.compiler_interface_cpp${dialect} can be collapsed to a single target as well.

Grep for any use of the word DIALECT or 17 and 20 in the CMake scripts.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions