To build, follow idiomatic CMake commands:
- make a build directory
mkdir build
cd build
- configure
with cuda support
cmake .. -DENABLE_CUDA=TRUE
or without
cmake ..
- build
cmake --build .
- (optionally) install
sudo cmake --install .
The consumer
directory shows the two main ways to use this CMake project as a dependency.
-
first build and install the project by following the instructions above, and then use
find_package()
to locate it -
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)