From 9f81a383a6f33636a49bc1a10217116131fa24c0 Mon Sep 17 00:00:00 2001 From: Sam Gamble Date: Wed, 4 Sep 2019 10:58:30 +0100 Subject: [PATCH] Add ktests to cmake & add note in README --- CMakeLists.txt | 4 ++++ README.md | 14 ++++++++++++++ ktest/runtests.sh | 4 ++++ ktest/runtestsx.sh | 4 ++++ src/CMakeLists.txt | 1 + src/validateitems/main.cpp | 1 + 6 files changed, 28 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84205c64..ad5e0c42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,4 +30,8 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") add_definitions( /DUNICODE /D_UNICODE ) # it is a new millenium endif() + +add_test(ktest ./ktest/runtests.sh) +add_test(ktest-extended ./ktest/runtestsx.sh) + add_subdirectory(src) diff --git a/README.md b/README.md index 04e5ee43..db5613e3 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,20 @@ $ ./autogen.sh Follow the rest of the process as described above. + +### Cmake build - Experimental + +Install Cmake from either system packages or [cmake.org](https://cmake.org/download/) + +``` sh +$ cmake . +``` + +``` sh +$ cmake all test +``` + + ## Windows Installation ### Pre-requisites diff --git a/ktest/runtests.sh b/ktest/runtests.sh index b15d1db4..b780a989 100755 --- a/ktest/runtests.sh +++ b/ktest/runtests.sh @@ -201,6 +201,10 @@ installertest() } +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") +cd $SCRIPTPATH + init installertest #fin diff --git a/ktest/runtestsx.sh b/ktest/runtestsx.sh index 0272cac0..69c28221 100755 --- a/ktest/runtestsx.sh +++ b/ktest/runtestsx.sh @@ -170,6 +170,10 @@ installertest() } +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") +cd $SCRIPTPATH + init installertest #fin diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b4c334c9..2edbe135 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,7 @@ add_subdirectory(aalcalc) add_subdirectory(aalcalctocsv) add_subdirectory(cdftocsv) +add_subdirectory(coveragetobin) add_subdirectory(coveragetocsv) add_subdirectory(damagebintobin) add_subdirectory(damagebintocsv) diff --git a/src/validateitems/main.cpp b/src/validateitems/main.cpp index 8726bc2a..8c42a3e3 100644 --- a/src/validateitems/main.cpp +++ b/src/validateitems/main.cpp @@ -44,6 +44,7 @@ Author: Ben Matharu email: ben.matharu@oasislmf.org #else #include #include +#include #endif #include "../include/oasis.h"