From 83310542c025299cae93753bef88a27486862867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com> Date: Thu, 15 Mar 2018 08:48:57 +0100 Subject: [PATCH] Plugged to CLI11 (command line parser) --- CMakeLists.txt | 9 ++++++++- main.cpp | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22b35dd8c..e3ab56d60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,15 +12,22 @@ include(CheckNotInSources) project (Pastis) +# CLI11 +add_subdirectory(${CMAKE_SOURCE_DIR}/packages/CLI11) +include_directories(${CMAKE_SOURCE_DIR}/packages/CLI11/include) + # Kokkos add_subdirectory(${CMAKE_SOURCE_DIR}/packages/kokkos) -include(GetKokkosCompilerFlags) include_directories(${Kokkos_INCLUDE_DIRS_RET}) + # Pastis utils add_subdirectory(utils) include_directories(utils) +# Compiler flags +include(GetKokkosCompilerFlags) + # Pastis binary add_executable(pastis main.cpp) target_link_libraries(pastis kokkos PastisUtils) diff --git a/main.cpp b/main.cpp index affb12fd5..4daf0270a 100644 --- a/main.cpp +++ b/main.cpp @@ -2,6 +2,8 @@ #include <Kokkos_Core.hpp> #include <RevisionInfo.hpp> +#include <CLI/CLI.hpp> + int main(int argc, char *argv[]) { std::cout << "It's pastis time!\n"; @@ -44,6 +46,7 @@ int main(int argc, char *argv[]) seq_count += (i % 2) == 0; } + int k =3; count_time = timer.seconds(); std::cout << "Sequential: " << seq_count << ' ' << count_time << '\n'; Kokkos::finalize(); -- GitLab