Skip to content

a small example project showing how to use CMake to manage a C++/CUDA project that uses OpenMP

Notifications You must be signed in to change notification settings

samuelpmishLLNL/openmp_cuda_example_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example CMake project using native CUDA and OpenMP support

To build, follow idiomatic CMake commands:

  1. make a build directory
mkdir build
cd build
  1. configure

with cuda support

cmake .. -DENABLE_CUDA=TRUE

or without

cmake ..
  1. build
cmake --build .
  1. (optionally) install
sudo cmake --install .

Using this CMake project as a dependency in another Project

The consumer directory shows the two main ways to use this CMake project as a dependency.

  1. first build and install the project by following the instructions above, and then use find_package() to locate it

  2. clone this CMake project and then have the consumer library do add_subdirectory in its CMakeLists.txt

Then (in either case), just do target_link_libraries(consumer_target PUBLIC omp_lib)

About

a small example project showing how to use CMake to manage a C++/CUDA project that uses OpenMP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published