Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
9d26afe
Ignore object files in git.
cedricchevalier19 Mar 9, 2020
1b2b56a
Add a root CMakeLists.txt
cedricchevalier19 May 12, 2024
50bf4e0
More exercises in the global CMake
cedricchevalier19 May 12, 2024
56003c8
CMake directory order follows tutorial
cedricchevalier19 May 12, 2024
6268211
Adding SIMD to CMakeLists.txt
cedricchevalier19 May 12, 2024
dec987e
Use `find_package(Kokkos REQUIRED)` in all exercises
cedricchevalier19 Jun 3, 2024
4f30736
`subview` now compiles with the DefaultExecutionSpace.
cedricchevalier19 Jun 3, 2024
f2cc0c8
Add CMake warnings when using device enabled Kokkos for the 2 first e…
cedricchevalier19 Jun 5, 2024
9ebf652
Adding 'instances' exercise to main CMake
cedricchevalier19 Jun 5, 2024
c4451a0
Adding 'scatter_view/Usage' to CMake
cedricchevalier19 Jun 5, 2024
1a9d282
Adding 'random_number' to CMake
cedricchevalier19 Jun 5, 2024
1b1dedc
Comment out some Kokkos call in Begin exercises
cedricchevalier19 Jun 5, 2024
1a07316
Adding 'unique_token' to CMake
cedricchevalier19 Jun 5, 2024
9bce058
Adding 'unordered_map' to CMake
cedricchevalier19 Jun 5, 2024
7c6a676
Adding 'virtual_functions' to CMake
cedricchevalier19 Jun 5, 2024
8b5cd95
List exercises to add to global cmake.
cedricchevalier19 Jun 5, 2024
5779c0f
Add `fortran_interface` to global cmake
cedricchevalier19 Jun 5, 2024
dacde70
Add `multi_gpu_cuda` to global cmake
cedricchevalier19 Jun 5, 2024
2bc96df
Add `minimd` to global cmake
cedricchevalier19 Jun 5, 2024
46fa1d0
Cleaning up exercise makefile.
cedricchevalier19 Jun 5, 2024
d6e6530
Fetch Kokkos sources into CMAKE_BINARY_DIR
cedricchevalier19 Jun 5, 2024
fe583b3
Use list(APPEND CMAKE_MODULE_PATH)
cedricchevalier19 Jun 11, 2024
5656d32
Fix no newline at end-of-file
cedricchevalier19 Jun 11, 2024
af3141e
Remove warning fixes that are not related to CMake
cedricchevalier19 Jun 11, 2024
5ccfe61
Use Kokkos_ENABLE_CUDA
cedricchevalier19 Jun 11, 2024
7bdf80c
Explicitly list accelerator backends for the 2 first exercise
cedricchevalier19 Jun 11, 2024
bfe7e16
Missing some newline at end-of-file
cedricchevalier19 Jun 11, 2024
798effa
Remove unneeded comment
cedricchevalier19 Jun 13, 2024
a451ee4
Add "" for appending to CMAKE_MODULE_PATH
cedricchevalier19 Jun 13, 2024
0e178f0
Only one top-level CMakeLists.txt
cedricchevalier19 Jun 14, 2024
90f978c
Make KokkostTutorials_FORECE_INTERNAL_Kokkos an official CMake option
cedricchevalier19 Jun 14, 2024
40db39d
Update README.md
cedricchevalier19 Jun 14, 2024
96cf66d
Add `KokkosTutorials_FORCE_EXTERNAL_Kokkos` option
cedricchevalier19 Jun 14, 2024
dba7191
Allow to configure Kokkos source dir
cedricchevalier19 Jun 14, 2024
b4d1484
Merge remote-tracking branch 'upstream/main' into fork/cedricchevalie…
cedricchevalier19 Feb 26, 2025
99b1c78
Use Kokkos 4.5.01
cedricchevalier19 Feb 26, 2025
93462e7
Move CMake utilities from .cmake to cmake
cedricchevalier19 Feb 26, 2025
f2e44a3
Share downloaded kokkos
cedricchevalier19 Feb 26, 2025
a96a6e2
Remove obsolete reference to SPACK_CXX
cedricchevalier19 Feb 26, 2025
f1b5bff
Macro to warn about using gpu backends on non-ready exercises
cedricchevalier19 Feb 26, 2025
208dcb6
Fix global compilation
cedricchevalier19 Feb 26, 2025
263297e
Update README.md
cedricchevalier19 Feb 26, 2025
1a6e198
Do not try to hide find_package(Kokkos)
cedricchevalier19 Feb 26, 2025
1c404fc
Use tarball to download Kokkos
cedricchevalier19 Feb 26, 2025
0b9221a
Fix include in mpi_exch directory
cedricchevalier19 Feb 26, 2025
cd94126
Update README.md
cedricchevalier19 Feb 26, 2025
4ec18a0
Update README.md
cedricchevalier19 Feb 26, 2025
e0ee40b
Update README.md
cedricchevalier19 Feb 26, 2025
d21fe57
Fix unique_token example compilation
cedricchevalier19 Feb 26, 2025
d3daa7f
Cleaning up
cedricchevalier19 Feb 26, 2025
bffe62b
Move SetUpKokkos to Exercices
cedricchevalier19 Feb 26, 2025
5f3a382
Merge remote-tracking branch 'upstream/main' into fork/cedricchevalie…
cedricchevalier19 Feb 26, 2025
cdb445f
Fix cmake policy for downloading Kokkos Core
cedricchevalier19 Apr 3, 2025
e514fc7
Merge remote-tracking branch 'origin/master' into cmake
cedricchevalier19 Apr 3, 2025
b148a85
Download Kokkos in Exercises/dep
cedricchevalier19 Jul 25, 2025
8a3aca6
Merge remote-tracking branch 'upstream/main' into fork/cedricchevalie…
cedricchevalier19 Jul 25, 2025
c47a017
Remove references to tasking example
cedricchevalier19 Jul 25, 2025
21baf0d
Follow @pzehner advice to fix time stamping
cedricchevalier19 Jul 25, 2025
1bafe0e
Add diagnostic messages for Kokkos location
cedricchevalier19 Jul 25, 2025
9e10417
Upgrade to Kokkos 4.6.02
cedricchevalier19 Jul 25, 2025
e6e1c66
Add an example with a custom Kokkos source directory
cedricchevalier19 Jul 25, 2025
0e4b265
Remove a confusing warning
cedricchevalier19 Jul 28, 2025
84c657b
Simplify README.md
cedricchevalier19 Jul 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Exercises/dep
*.o
*.host
*.cuda
KokkosCore_config.h
KokkosCore_config.tmp
*.a

Comment on lines +1 to +8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in general against .gitignores if possible ... I want to see what changed and I think devs should be aware of what they push ...

Copy link

@pzehner pzehner Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most of it can go out, besides Exercises/dep, since we're only relying on CMake. But I would add build*/.

I removed the .gitignore after a build to see what git status gives, and it's Kokkos sources and the build directories.

36 changes: 36 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorials)

# These directories follow IntroFull order of introduction

add_subdirectory(Exercises/01)
add_subdirectory(Exercises/02)
add_subdirectory(Exercises/03)
add_subdirectory(Exercises/04)

add_subdirectory(Exercises/dualview)
add_subdirectory(Exercises/mdrange)
add_subdirectory(Exercises/subview)
add_subdirectory(Exercises/scatter_view)
add_subdirectory(Exercises/team_policy)
add_subdirectory(Exercises/team_vector_loop)
add_subdirectory(Exercises/team_scratch_memory)
add_subdirectory(Exercises/simd)
# FIXME update the code
# add_subdirectory(Exercises/simd_warp)

add_subdirectory(Exercises/advanced_reductions)
add_subdirectory(Exercises/instances)
add_subdirectory(Exercises/multi_gpu_cuda)
add_subdirectory(Exercises/parallel_scan)
add_subdirectory(Exercises/random_number)
add_subdirectory(Exercises/tools_minimd)
add_subdirectory(Exercises/unique_token)
add_subdirectory(Exercises/unordered_map)
add_subdirectory(Exercises/virtualfunction)

# Not done yet
# TODO, require Kokkos Kernels
# add_subdirectory(Exercises/kokkoskernels)
# require remote spaces
# add_subdirectory(Exercises/vectorshift)
7 changes: 5 additions & 2 deletions Exercises/01/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial01)
include(../../common.cmake)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

KokkosTutorials_WarnGPU()

add_executable(01_Exercise exercise_1_begin.cpp)
target_link_libraries(01_Exercise Kokkos::kokkos)

5 changes: 5 additions & 0 deletions Exercises/01/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial01)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 5 additions & 3 deletions Exercises/01/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial01)
include(../../common.cmake)

add_executable(01_Exercise exercise_1_solution.cpp)
target_link_libraries(01_Exercise Kokkos::kokkos)
# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

KokkosTutorials_WarnGPU()

add_executable(01_Solution exercise_1_solution.cpp)
target_link_libraries(01_Solution Kokkos::kokkos)
8 changes: 5 additions & 3 deletions Exercises/02/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial02)
include(../../common.cmake)

add_executable(02_Exercise exercise_2_begin.cpp)
target_link_libraries(02_Exercise Kokkos::kokkos)
# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

KokkosTutorials_WarnGPU()

add_executable(02_Exercise exercise_2_begin.cpp)
target_link_libraries(02_Exercise Kokkos::kokkos)
5 changes: 5 additions & 0 deletions Exercises/02/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial02)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 5 additions & 3 deletions Exercises/02/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial02)
include(../../common.cmake)

add_executable(02_Exercise exercise_2_solution.cpp)
target_link_libraries(02_Exercise Kokkos::kokkos)
# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

KokkosTutorials_WarnGPU()

add_executable(02_Solution exercise_2_solution.cpp)
target_link_libraries(02_Solution Kokkos::kokkos)
6 changes: 3 additions & 3 deletions Exercises/03/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial03)
include(../../common.cmake)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(03_Exercise exercise_3_begin.cpp)
target_link_libraries(03_Exercise Kokkos::kokkos)


5 changes: 5 additions & 0 deletions Exercises/03/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial03)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 4 additions & 4 deletions Exercises/03/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial03)
include(../../common.cmake)

add_executable(03_Exercise exercise_3_solution.cpp)
target_link_libraries(03_Exercise Kokkos::kokkos)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(03_Solution exercise_3_solution.cpp)
target_link_libraries(03_Solution Kokkos::kokkos)
6 changes: 3 additions & 3 deletions Exercises/04/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial04)
include(../../common.cmake)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(04_Exercise exercise_4_begin.cpp)
target_link_libraries(04_Exercise Kokkos::kokkos)


5 changes: 5 additions & 0 deletions Exercises/04/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial04)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 4 additions & 4 deletions Exercises/04/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial04)
include(../../common.cmake)

add_executable(04_Exercise exercise_4_solution.cpp)
target_link_libraries(04_Exercise Kokkos::kokkos)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(04_Solution exercise_4_solution.cpp)
target_link_libraries(04_Solution Kokkos::kokkos)
51 changes: 51 additions & 0 deletions Exercises/SetUpKokkos.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Convenience macro to warn the user if a GPU backend is enabled
macro(KokkosTutorials_WarnGPU)
if (Kokkos_ENABLE_CUDA OR Kokkos_ENABLE_HIP OR Kokkos_ENABLE_SYCL OR Kokkos_ENABLE_OPENMPTARGET OR Kokkos_ENABLE_HPX)
message(WARNING "cmake"
"a Kokkos accelerator backend is enabled, it might cause issue with the current program"
"Please recompile with only a host backend enabled (e.g. -DKokkos_ENABLE_OPENMP=ON)")
endif ()
endmacro()

# Early return if Kokkos is already set up
# We do not use Kokkos_FOUND as it is not globally defined
if (TARGET Kokkos::kokkos)
return()
endif ()

if (NOT CMAKE_BUILD_TYPE)
set(default_build_type "RelWithDebInfo")
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING
"Choose the type of build, options are: Debug, Release, RelWithDebInfo and MinSizeRel."
FORCE)
endif ()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, if Kokkos is already found, the build type is not specified for the files of the tutorial. Is it what we want?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've kept how it was working. I do not really see any added value and I am happy to remove this part.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's true that CMake always let the user choose what kind of build they want.


# Where to find Kokkos' source code. This might be set by the user.
# In order to automatically share the download between exercises when they are compiled individually,
# the default directory is inside the source tree.
# This might break if the default in source directory is called from multiple cmake instances at the same time.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If several CMake instances download at the same time I am not it will always work.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, maybe you can rework the sentence then.


set(KokkosTutorials_KOKKOS_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/dep/kokkos" CACHE PATH "Where Kokkos sources are located")

find_package(Kokkos QUIET)

if (Kokkos_FOUND)
message(STATUS "Found Kokkos: ${Kokkos_DIR} (version \"${Kokkos_VERSION}\")")
else ()
if (EXISTS ${KokkosTutorials_KOKKOS_SOURCE_DIR})
message(STATUS "Using Kokkos from ${KokkosTutorials_KOKKOS_SOURCE_DIR}")
add_subdirectory(${KokkosTutorials_KOKKOS_SOURCE_DIR} Kokkos)
else ()
message(STATUS "Downloading Kokkos to ${KokkosTutorials_KOKKOS_SOURCE_DIR}")
include(FetchContent)
FetchContent_Declare(
Kokkos
URL https://github.com/kokkos/kokkos/releases/download/4.6.02/kokkos-4.6.02.tar.gz
URL_HASH SHA256=baf1ebbe67abe2bbb8bb6aed81b4247d53ae98ab8475e516d9c87e87fa2422ce
SOURCE_DIR ${KokkosTutorials_KOKKOS_SOURCE_DIR}
DOWNLOAD_EXTRACT_TIMESTAMP ON
)
FetchContent_MakeAvailable(Kokkos)
endif ()
endif ()
7 changes: 4 additions & 3 deletions Exercises/advanced_reductions/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial01)
include(../../common.cmake)
project(KokkosTutorialAdvancedReductions)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(AdvancedReductions advanced_reductions.cpp)
target_link_libraries(AdvancedReductions Kokkos::kokkos)

3 changes: 2 additions & 1 deletion Exercises/advanced_reductions/Begin/advanced_reductions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ int main(int argc, char *argv[]) {
n, KOKKOS_LAMBDA(int i) { view(i) = 1 + i / 10.; });

double result;
Kokkos::parallel_reduce(n, GeometricMean{view}, result);
// EXERCISE uncomment the following line when GeometricMean is implemented
// Kokkos::parallel_reduce(n, GeometricMean{view}, result);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment here, please propose this change as its own PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was necessary in order to compile this exercise. I will comment out the add_subdirectory and do a separate PR.


auto host_view =
Kokkos::create_mirror_view_and_copy(Kokkos::HostSpace{}, view);
Expand Down
5 changes: 5 additions & 0 deletions Exercises/advanced_reductions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialAdvancedReductions)

add_subdirectory(Begin)
add_subdirectory(Solution)
9 changes: 5 additions & 4 deletions Exercises/advanced_reductions/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorial01)
include(../../common.cmake)
project(KokkosTutorialAdvancedReductions)

add_executable(AdvancedReductions advanced_reductions.cpp)
target_link_libraries(AdvancedReductions Kokkos::kokkos)
# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(AdvancedReductions_Solution advanced_reductions.cpp)
target_link_libraries(AdvancedReductions_Solution Kokkos::kokkos)
27 changes: 0 additions & 27 deletions Exercises/common.cmake

This file was deleted.

6 changes: 3 additions & 3 deletions Exercises/dualview/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialDualView)
include(../../common.cmake)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(dualview dual_view_exercise.cpp)
target_link_libraries(dualview Kokkos::kokkos)


5 changes: 5 additions & 0 deletions Exercises/dualview/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialDualView)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 4 additions & 4 deletions Exercises/dualview/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialDualView)
include(../../common.cmake)

add_executable(dualview dual_view_exercise.cpp)
target_link_libraries(dualview Kokkos::kokkos)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(dualview_Solution dual_view_exercise.cpp)
target_link_libraries(dualview_Solution Kokkos::kokkos)
8 changes: 8 additions & 0 deletions Exercises/instances/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialInstances)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(Instances_exercise instances_begin.cpp)
target_link_libraries(Instances_exercise Kokkos::kokkos)
1 change: 0 additions & 1 deletion Exercises/instances/Begin/instances_begin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,3 @@ int main( int argc, char* argv[] )

return 0;
}

6 changes: 5 additions & 1 deletion Exercises/instances/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#Todo: Add CMake build
cmake_minimum_required(VERSION 3.16)
project(KokkosInstances)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 8 additions & 0 deletions Exercises/instances/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialInstances)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(Instances_solution instances_solution.cpp)
target_link_libraries(Instances_solution Kokkos::kokkos)
1 change: 0 additions & 1 deletion Exercises/instances/Solution/instances_solution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,3 @@ int main( int argc, char* argv[] )

return 0;
}

6 changes: 3 additions & 3 deletions Exercises/mdrange/Begin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialMdRange)
include(../../common.cmake)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(mdrange_exercise exercise_mdrange_begin.cpp)
target_link_libraries(mdrange_exercise Kokkos::kokkos)


5 changes: 5 additions & 0 deletions Exercises/mdrange/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialMDRange)

add_subdirectory(Begin)
add_subdirectory(Solution)
8 changes: 4 additions & 4 deletions Exercises/mdrange/Solution/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
project(KokkosTutorialMdRange)
include(../../common.cmake)

add_executable(mdrange_exercise exercise_mdrange_solution.cpp)
target_link_libraries(mdrange_exercise Kokkos::kokkos)

# Add a custom module path for find_package(Kokkos)
include(../../SetUpKokkos.cmake)

add_executable(mdrange_Solution exercise_mdrange_solution.cpp)
target_link_libraries(mdrange_Solution Kokkos::kokkos)
Loading
Loading