Debian Codegraph @

packages/kokkos/example/build_cmake_installed_kk_as_language/CMakeLists.txt

raw
1 # Kokkos minimally requires 3.16 right now,
2 # but your project can set it higher
3 cmake_minimum_required(VERSION 3.19)
4
5 # Projects can safely mix languages - must have C++ support
6 # Kokkos flags will only apply to C++ files
7 project(Example CXX Fortran CUDA)
8
9 # Look for an installed Kokkos
10 find_package(Kokkos COMPONENTS separable_compilation)
11 set_source_files_properties(cmake_example.cpp PROPERTIES LANGUAGE CUDA)
12 add_executable(example cmake_example.cpp bar.cpp foo.f)
13
14 # This is the only thing required to set up compiler/linker flags
15 target_link_libraries(example Kokkos::kokkos)
16
17 enable_testing()
18 add_test(NAME KokkosInTree_Verify COMMAND example 10)