fix cmake for tests

This commit is contained in:
2020-07-20 18:22:55 +03:00
parent ea624a5111
commit 20c58f5423

View File

@@ -85,7 +85,8 @@ set(HDRS)
set(PHDRS)
if (TESTS)
set(PIP_SRC_CONCURRENT_TEST "lib/concurrent/test")
include(DownloadGTest)
set(PIP_CONCURRENT_TEST "lib/concurrent/test")
endif()
if (DEFINED ENV{QNX_HOST} OR PIP_FREERTOS)
@@ -210,7 +211,7 @@ gather_src("${PIP_SRC_IO_UTILS}" CPP_LIB_IO_UTILS HDRS PHDRS)
# Concurrent lib
gather_src("${PIP_SRC_CONCURRENT}" CPP_LIB_CONCURRENT HDRS PHDRS)
gather_src("${PIP_SRC_CONCURRENT_TEST}" CPP_CONCURRENT_TEST HDRS PHDRS)
gather_src("${PIP_CONCURRENT_TEST}" CPP_CONCURRENT_TEST HDRS PHDRS)
# Cloud lib
gather_src("${PIP_SRC_CLOUD}" CPP_LIB_CLOUD HDRS PHDRS)
@@ -272,12 +273,6 @@ else()
message(STATUS "Building PIP release version")
endif()
if (TESTS)
include(DownloadGTest)
set(CONCURRENT_TESTS 1) #"Enable tests for concurrent library"
else()
set(CONCURRENT_TESTS 0)
endif()
# Check if std::iostream operators support
if(STD_IOSTREAM)