Skip to content

Conversation

@alliepiper
Copy link
Contributor

@alliepiper alliepiper commented Nov 26, 2025

Fixes some edge cases in the internal dependency graphs that were broken by the libcudacxx/thrust/cub interdependency.

Adds /Zc:preprocessor and /Zc:__cplusplus to libcudacxx::libcudacxx's public interface. Re-check enabled languages / compilers for repeated find_package calls to CCCL projects, since CUDA / CUDA_HOST compilers may be unknown during the first pass through the find module.

Changes the /Zc:preprocessor check into an #error rather than a #pragma message. MSVC will encounter preprocessor issues and exit with non-obvious errors before handling the #pragma message, so users were not seeing the message when it was needed.

Misc:

  • Adds cccl_get_<project> helpers for cccl, thrust, cub, libcudacxx, cudax and CUDAToolkit to reduce noise and keep find_package logic consistent.
  • Ensure that all internal projects are finding and linking their interdependencies correctly using new helpers.
  • Set <Project>_DIR in the CMake cache when including CCCL with add_subdirectory/CPM. Ensures that future calls to find_package(CCCL) will resolve to the same config files, but won't override user settings.
  • Cleaned up enable_language(CUDA) usages.
  • Update ci/test_packaging.sh to:
    • Use the HEAD commit of the local repository when run locally.
    • Always use the local repo checkout as upstream when fetching from CPM in examples both locally and in CI. Much faster than network clones.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Nov 26, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Nov 26, 2025
@alliepiper alliepiper marked this pull request as ready for review November 26, 2025 17:08
@alliepiper alliepiper requested review from a team as code owners November 26, 2025 17:08
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Nov 26, 2025
When `/Zc:preprocessor` is not set, the build will error out before `#pragma message` directives are handled.
Changing to an error ensures that this will be caught.
These are no longer needed since the public libcudacxx target now adds them.
@github-actions

This comment has been minimized.

@alliepiper
Copy link
Contributor Author

pre-commit.ci autofix

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Nov 26, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@alliepiper alliepiper force-pushed the msvc-preprocessor branch 2 times, most recently from 1f34aa6 to 7906387 Compare November 26, 2025 21:51
@alliepiper alliepiper changed the title libcudacxx public MSVC flags Add /Zc:preprocessor and /Zc:__cplusplus to libcudacxx public interface on MSVC. Nov 27, 2025
@github-actions

This comment has been minimized.

@alliepiper alliepiper requested a review from a team as a code owner November 27, 2025 13:30
@alliepiper
Copy link
Contributor Author

/ok to test

@github-actions

This comment has been minimized.

@alliepiper
Copy link
Contributor Author

/ok to test

@github-actions

This comment has been minimized.

@alliepiper
Copy link
Contributor Author

/ok to test

@github-actions

This comment has been minimized.

@alliepiper
Copy link
Contributor Author

/ok to test

@github-actions

This comment has been minimized.

@alliepiper alliepiper changed the title Add /Zc:preprocessor and /Zc:__cplusplus to libcudacxx public interface on MSVC. Improve CMake package handling, add MSVC compat flags to libcudacxx's public interface. Nov 29, 2025
@alliepiper alliepiper marked this pull request as ready for review November 29, 2025 15:52
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Nov 29, 2025
@alliepiper alliepiper marked this pull request as draft November 29, 2025 16:01
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Review to In Progress in CCCL Nov 29, 2025
@github-actions
Copy link
Contributor

😬 CI Workflow Results

🟥 Finished in 47m 33s: Pass: 0%/1 | Total: 47m 33s | Max: 47m 33s

See results here.

@alliepiper alliepiper force-pushed the msvc-preprocessor branch 2 times, most recently from 858aa29 to 7390248 Compare November 29, 2025 18:39
@alliepiper
Copy link
Contributor Author

/ok to test

@alliepiper
Copy link
Contributor Author

/ok to test

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

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant