From c48bc7730eecc7e2c0fdb3b300cb3f986d2dc584 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 7 Sep 2018 10:19:03 +0200 Subject: [PATCH] Use Kokkos in tests --- tests/CMakeLists.txt | 1 + tests/test_main.cpp | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3b4823f1e..03480e1d6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -15,6 +15,7 @@ target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}) target_link_libraries (unit_tests PastisUtils + kokkos Catch ) diff --git a/tests/test_main.cpp b/tests/test_main.cpp index b3143fbb1..ada032c04 100644 --- a/tests/test_main.cpp +++ b/tests/test_main.cpp @@ -1,2 +1,15 @@ -#define CATCH_CONFIG_MAIN +#define CATCH_CONFIG_RUNNER #include <catch.hpp> + +#include <Kokkos_Core.hpp> + +int main( int argc, char* argv[] ) +{ + Kokkos::initialize({-1,-1,-1,true}); + + int result = Catch::Session().run( argc, argv ); + + Kokkos::finalize(); + + return result; +} -- GitLab