File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,16 +60,23 @@ function(thrust_set_target_properties target_name host device dialect prefix)
6060 _THRUST_PREFIX ${prefix}
6161 )
6262
63+ get_property (langs GLOBAL PROPERTY ENABLED_LANGUAGES )
64+ set (standard_features)
65+ if (CUDA IN_LIST langs)
66+ list (APPEND standard_features cuda_std_${dialect} )
67+ endif ()
68+ if (CXX IN_LIST langs)
69+ list (APPEND standard_features cxx_std_${dialect} )
70+ endif ()
71+
6372 get_target_property (type ${target_name} TYPE )
6473 if (${type} STREQUAL "INTERFACE_LIBRARY" )
6574 target_compile_features (${target_name} INTERFACE
66- cxx_std_${dialect}
67- cuda_std_${dialect}
75+ ${standard_features}
6876 )
6977 else ()
7078 target_compile_features (${target_name} PUBLIC
71- cxx_std_${dialect}
72- cuda_std_${dialect}
79+ ${standard_features}
7380 )
7481 set_target_properties (${target_name}
7582 PROPERTIES
You can’t perform that action at this time.
0 commit comments