pimatmatrix test

This commit is contained in:
2020-07-16 16:33:31 +03:00
parent ea624a5111
commit dbb84885e3
2 changed files with 15 additions and 5 deletions

View File

@@ -2,12 +2,12 @@ cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
project(pip)
set(_PIP_MAJOR 1)
set(_PIP_MINOR 24)
set(_PIP_MINOR 23)
set(_PIP_REVISION 0)
set(_PIP_SUFFIX )
set(_PIP_COMPANY SHS)
set(_PIP_DOMAIN org.SHS)
set(TESTS=true)
if ("x${CMAKE_MODULE_PATH}" STREQUAL "x")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
endif()
@@ -35,7 +35,7 @@ option(STD_IOSTREAM "Building with std iostream operators support" OFF)
option(INTROSPECTION "Build with introspection" OFF)
option(LIB "System install" ON)
option(STATIC_LIB OFF)
option(TESTS "Build tests and perform their before install step" OFF)
option(TESTS "Build tests and perform their before install step" ON)
set(PIP_UTILS 1)
if(LIBPROJECT)
set(PIP_UTILS ${UTILS})
@@ -86,6 +86,7 @@ set(PHDRS)
if (TESTS)
set(PIP_SRC_CONCURRENT_TEST "lib/concurrent/test")
set(PIP_SRC_MATH_TEST "lib/main/math/test")
endif()
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
@@ -275,10 +276,14 @@ endif()
if (TESTS)
include(DownloadGTest)
set(CONCURRENT_TESTS 1) #"Enable tests for concurrent library"
set(MATH_TESTS 1) #"Enable tests for concurrent library"
else()
set(CONCURRENT_TESTS 0)
set(MATH_TESTS 0)
endif()
# Check if std::iostream operators support
if(STD_IOSTREAM)
add_definitions(-DPIP_STD_IOSTREAM)
@@ -601,7 +606,12 @@ if (NOT CROSSTOOLS)
add_test(NAME pip_concurrent_test COMMAND tests)
add_custom_target(pip_concurrent_test_perform ALL COMMAND pip_concurrent_test)
endif()
if(MATH_TESTS)
add_executable(pip_math_test ${CPP_MATH_TEST})
target_link_libraries(pip_math_test gtest_main gmock_main pip_math)
add_test(NAME pip_math_test COMMAND tests)
add_custom_target(pip_math_test_perform ALL COMMAND pip_math_test)
endif()
# Build cloud library if crypt enabled
if(sodium_FOUND)

View File