From 20c58f54239301af9f31a19607c6fe0dab0783d4 Mon Sep 17 00:00:00 2001 From: andrey Date: Mon, 20 Jul 2020 18:22:55 +0300 Subject: [PATCH] fix cmake for tests --- CMakeLists.txt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ff959ed..98a0bb6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)