Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure CUB/Thrust for C++17 by default #2217

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cub/cmake/CubBuildTargetList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ set(CUB_CPP_DIALECT_OPTIONS
)

define_property(TARGET PROPERTY _CUB_DIALECT
BRIEF_DOCS "A target's C++ dialect: 11, 14, or 17."
FULL_DOCS "A target's C++ dialect: 11, 14, or 17."
BRIEF_DOCS "A target's C++ dialect: 11, 14, 17 or 20."
FULL_DOCS "A target's C++ dialect: 11, 14, 17 or 20."
)
define_property(TARGET PROPERTY _CUB_PREFIX
BRIEF_DOCS "A prefix describing the config, eg. 'cub.cpp14'."
FULL_DOCS "A prefix describing the config, eg. 'cub.cpp14'."
BRIEF_DOCS "A prefix describing the config, eg. 'cub.cpp17'."
FULL_DOCS "A prefix describing the config, eg. 'cub.cpp17'."
)

function(cub_set_target_properties target_name dialect prefix)
Expand Down Expand Up @@ -134,7 +134,7 @@ function(cub_build_target_list)
foreach (dialect IN LISTS CUB_CPP_DIALECT_OPTIONS)
# Create CMake options:
set(default_value OFF)
if (dialect EQUAL 14) # Default to just 14 on:
if (dialect EQUAL 17) # Default to just 17 on:
set(default_value ON)
endif()
option(CUB_ENABLE_DIALECT_CPP${dialect}
Expand Down
4 changes: 2 additions & 2 deletions thrust/cmake/ThrustMultiConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function(thrust_configure_multiconfig)
# Handle dialect options:
foreach (dialect IN LISTS THRUST_CPP_DIALECT_OPTIONS)
set(default_value OFF)
if (dialect EQUAL 14) # Default to just 14 on:
if (dialect EQUAL 17) # Default to just 17 on:
set(default_value ON)
endif()
option(THRUST_MULTICONFIG_ENABLE_DIALECT_CPP${dialect}
Expand Down Expand Up @@ -112,7 +112,7 @@ function(thrust_configure_multiconfig)
set_property(CACHE THRUST_DEVICE_SYSTEM PROPERTY TYPE STRING)
endif()

set(THRUST_CPP_DIALECT 14
set(THRUST_CPP_DIALECT 17
CACHE STRING "The C++ standard to target: ${THRUST_CPP_DIALECT_OPTIONS}"
)
set_property(CACHE THRUST_CPP_DIALECT
Expand Down
Loading