Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Configuration Fails with OpenMP_CUDA Not Found #333

Open
shw0622 opened this issue Feb 21, 2025 · 3 comments
Open

CMake Configuration Fails with OpenMP_CUDA Not Found #333

shw0622 opened this issue Feb 21, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@shw0622
Copy link

shw0622 commented Feb 21, 2025

Environment Configuration

Component Version
GPU Model NVIDIA RTX 4070
CUDA Toolkit 12.8
Visual Studio 2022 (17.9.6)
CMake 3.31.0
OS Windows 10

Reproduction Steps

git clone https://github.com/NVIDIA/cuda-samples
cd cuda-samples
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -A x64
Error LogCMake Error at D:/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find OpenMP_CUDA (missing: OpenMP_CUDA_FLAGS OpenMP_CUDA_LIB_NAMES)
Call Stack:
  FindOpenMP.cmake:616 (find_package_handle_standard_args)
  Samples/0_Introduction/UnifiedMemoryStreams/CMakeLists.txt:21 (find_package)
@rwarmstr
Copy link
Collaborator

This looks like it might be a CMake issue. Support for the CUDA language in FindOpenMP was added in CMake 3.31 so it's pretty new, there may be fixes needed for Visual Studio.

Thanks for the report, we're looking into it.

@rwarmstr rwarmstr added the bug Something isn't working label Feb 21, 2025
@rwarmstr
Copy link
Collaborator

For now, if you don't actually need to build that sample, you can comment out the corresponding add_subdirectory command in the CMakeLists.txt in the parent folder

@Peter-RealiSim
Copy link

Peter-RealiSim commented Mar 8, 2025

Thanks, the fix works fine, the other 181 sample projects are generated .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants