CMake Configuration Fails with OpenMP_CUDA Not Found
Open
Nobody has claimed this yet.
bug
- Dominant language
- C++
- Stars
- 9.6k
- Forks
- 2.4k
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Samples/0_Introduction/UnifiedMemoryStreams/CMakeLists.txt:21 and reproduce the failure using the reported CMake command on Windows with the Visual Studio 2022 generator. Read the FindOpenMP.cmake failure for missing OpenMP_CUDA_FLAGS and OpenMP_CUDA_LIB_NAMES. Done means the sample configuration completes successfully without the reported OpenMP_CUDA error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100