diff --git a/CMakeLists.txt b/CMakeLists.txt index 908440a71a333485a3c6fdf6a36869e182c0ecc6..22712a3d62f848c7e582e6cb7f4e7efe940383d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,22 @@ cmake_minimum_required(VERSION 3.15) -project(EvalHyd LANGUAGES CXX VERSION 0.0.1 DESCRIPTION "Utility to evaluate streamflow predictions") + +project( + EvalHyd + LANGUAGES CXX + VERSION 0.0.1 + DESCRIPTION "Utility to evaluate streamflow predictions" +) + +# ------------------------------------------------------------------------------ +# dependencies +# ------------------------------------------------------------------------------ + +find_package(xtensor REQUIRED) +message(STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS}/xtensor") + +# ------------------------------------------------------------------------------ +# build +# ------------------------------------------------------------------------------ # define evalhyd library add_library( @@ -22,8 +39,6 @@ target_include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src ) -find_package(xtensor REQUIRED) - target_link_libraries( evalhyd PUBLIC @@ -36,9 +51,15 @@ target_compile_features( cxx_std_14 ) -# testing +# test suite OPTION(EVALHYD_BUILD_TEST "configure and compile tests" ON) if(EVALHYD_BUILD_TEST) add_subdirectory(tests) endif() + +# ------------------------------------------------------------------------------ +# installation +# ------------------------------------------------------------------------------ + +# TODO diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 48c14623c52d570e0bd4775cbb5c566423b81a81..02690d49cb1948f2aa16dc378c98fa32b31a544e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,13 @@ cmake_minimum_required(VERSION 3.15) -# TEST SUITE ------------------------------------------------------------------- +# ------------------------------------------------------------------------------ +# dependencies +# ------------------------------------------------------------------------------ +find_package(GTest REQUIRED) + +# ------------------------------------------------------------------------------ +# build +# ------------------------------------------------------------------------------ add_executable( evalhyd_tests test_determinist.cpp @@ -17,11 +24,9 @@ target_include_directories( target_compile_definitions( evalhyd_tests PRIVATE - EVALHYD_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" + EVALHYD_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" ) -find_package(GTest REQUIRED) - target_link_libraries( evalhyd_tests PRIVATE