Skip to content

Commit

Permalink
Configure CUB/Thrust for C++17 by default (#2217)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Aug 14, 2024
1 parent 73df2b0 commit cbce14b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit cbce14b

Please sign in to comment.