Skip to content

Conversation

@wmaxey
Copy link
Member

@wmaxey wmaxey commented Jan 15, 2026

Description

closes #7196

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@wmaxey wmaxey requested review from a team as code owners January 15, 2026 02:24
@github-project-automation github-project-automation bot moved this to Todo in CCCL Jan 15, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Jan 15, 2026
Comment on lines +23 to +56
add_library(
"nvtarget_cpp${dialect}"
OBJECT
nvtargettest.cpp
)
add_library(
"nvtarget_cuda${dialect}"
OBJECT
nvtargettest.cu
)

target_include_directories(
"nvtarget_cpp${dialect}"
PRIVATE "${libcudacxx_SOURCE_DIR}/include"
)
target_include_directories(
"nvtarget_cuda${dialect}"
PRIVATE "${libcudacxx_SOURCE_DIR}/include"
)

set_target_properties(
"nvtarget_cpp${dialect}"
PROPERTIES
COMPILE_OPTIONS "${headertest_warning_levels_host}"
CXX_STANDARD "${dialect}"
CXX_STANDARD_REQUIRED ON
)
set_target_properties(
"nvtarget_cuda${dialect}"
PROPERTIES
COMPILE_OPTIONS "${headertest_warning_levels_device}"
CUDA_STANDARD "${dialect}"
CUDA_STANDARD_REQUIRED ON
)
Copy link
Contributor

@davebayer davebayer Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be a better solution:

  if ("cxx_std_${dialect}" IN_LIST CMAKE_CXX_COMPILE_FEATURES)
    add_library("nvtarget_cpp${dialect}" OBJECT nvtargettest.cpp)
    target_compile_features("nvtarget_cpp${dialect}" PRIVATE "cxx_std_${dialect}")
  endif()

  if ("cuda_std_${dialect}" IN_LIST CMAKE_CUDA_COMPILE_FEATURES)
    add_library("nvtarget_cuda${dialect}" OBJECT nvtargettest.cu)
    target_compile_features("nvtarget_cuda${dialect}" PRIVATE "cuda_std_${dialect}")
  endif()

It will check whether the compiler even supports the dialect first

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'll swap it out for that, I'm operating off the assumption that we don't have to deal with incompatible compilers by now.

@github-actions
Copy link
Contributor

😬 CI Workflow Results

🟥 Finished in 5h 54m: Pass: 99%/250 | Total: 6d 01h | Max: 5h 53m | Hits: 84%/346083

See results here.

Comment on lines +3 to +18
if (MSVC)
set(
nvtarget_dialects
14
17
20
)
else()
set(
nvtarget_dialects
11
14
17
20
)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we want to run this in all configurations and C++20 is only available in some, so we should make sure this is supported

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be solved by checking the available compiler features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

[FEA]: [CI] Add tests for nv/target in pre-C++17 dialects

4 participants