Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Support building the test suite without CUDA language enabled. #1389

Merged
merged 1 commit into from
Feb 19, 2021
Merged
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
15 changes: 11 additions & 4 deletions cmake/ThrustBuildTargetList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,23 @@ function(thrust_set_target_properties target_name host device dialect prefix)
_THRUST_PREFIX ${prefix}
)

get_property(langs GLOBAL PROPERTY ENABLED_LANGUAGES)
set(standard_features)
if (CUDA IN_LIST langs)
list(APPEND standard_features cuda_std_${dialect})
endif()
if (CXX IN_LIST langs)
list(APPEND standard_features cxx_std_${dialect})
endif()

get_target_property(type ${target_name} TYPE)
if (${type} STREQUAL "INTERFACE_LIBRARY")
target_compile_features(${target_name} INTERFACE
cxx_std_${dialect}
cuda_std_${dialect}
${standard_features}
)
else()
target_compile_features(${target_name} PUBLIC
cxx_std_${dialect}
cuda_std_${dialect}
${standard_features}
)
set_target_properties(${target_name}
PROPERTIES
Expand Down