-
Thibault Hallouin authored
This is required for the bindings, because the 2D views on 4D tensors must be on the correct type (i.e. pytensor/rtensor/xtensor). Although, casting of the views to become xtensor could have been used instead. In doing so, there is no source file to be compiled anymore, so this becomes a header-only library. But to keep the "public" headers separate from the implementation, a subdirectory "detail/" is added.
ee8e2ef0
cmake_minimum_required(VERSION 3.15)
# ------------------------------------------------------------------------------
# dependencies
# ------------------------------------------------------------------------------
find_package(GTest REQUIRED)
# ------------------------------------------------------------------------------
# build
# ------------------------------------------------------------------------------
add_executable(
evalhyd_tests
test_determinist.cpp
test_probabilist.cpp
test_uncertainty.cpp
)
set_target_properties(
evalhyd_tests
PROPERTIES
VISIBILITY_INLINES_HIDDEN ON
)
target_include_directories(
evalhyd_tests
PRIVATE
${CMAKE_SOURCE_DIR}/include/evalhyd
)
target_compile_definitions(
evalhyd_tests
PRIVATE
EVALHYD_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data"
)
target_link_libraries(
evalhyd_tests
PRIVATE
EvalHyd::evalhyd
GTest::GTest
GTest::Main
)