mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-07-01 20:20:29 +08:00
Bug 5164417 and 5097376: Fix the OpenMP issue finding issue for MSVC and Glang
This commit is contained in:
parent
a45fd3bd7c
commit
49159f3739
@ -380,7 +380,7 @@ To set up GLFW on a Windows system, Download the pre-built binaries from [GLFW w
|
|||||||
|
|
||||||
#### OpenMP
|
#### OpenMP
|
||||||
|
|
||||||
OpenMP is an API for multiprocessing programming. OpenMP can be installed using your Linux distribution's package manager system. It usually comes preinstalled with GCC. It can also be found at the [OpenMP website](http://openmp.org/).
|
OpenMP is an API for multiprocessing programming. OpenMP can be installed using your Linux distribution's package manager system. It usually comes preinstalled with GCC. It can also be found at the [OpenMP website](http://openmp.org/). For compiler like Clang, libomp.so for llvm need to be install separately, and also the flags need to be set in cmake configuration, such as `-DOpenMP_CXX_FLAGS="-fopenmp=libomp" -DOpenMP_CXX_LIB_NAMES="omp" -DOpenMP_omp_LIBRARY="/path/to/libomp.so"`.
|
||||||
|
|
||||||
#### Screen
|
#### Screen
|
||||||
|
|
||||||
|
@ -20,7 +20,11 @@ endif()
|
|||||||
include_directories(../../../Common)
|
include_directories(../../../Common)
|
||||||
|
|
||||||
# Source file
|
# Source file
|
||||||
find_package(OpenMP REQUIRED)
|
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||||
|
find_package(OpenMP REQUIRED C CXX)
|
||||||
|
else()
|
||||||
|
find_package(OpenMP REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(${OpenMP_FOUND})
|
if(${OpenMP_FOUND})
|
||||||
# Add target for UnifiedMemoryStreams
|
# Add target for UnifiedMemoryStreams
|
||||||
|
Loading…
x
Reference in New Issue
Block a user