Skip to content
Snippets Groups Projects
Commit 55471c1a authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix build without testing

parent 7f942bf7
Branches
Tags
No related merge requests found
......@@ -10,9 +10,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules/)
include(astyle)
if(BUILD_TESTS)
include(testing_cpp)
endif()
include(testing_cpp)
add_subdirectory(producer/api)
add_subdirectory(common/cpp)
......
enable_testing()
set (HIDRA2_MINIMUM_COVERAGE 70)
find_package (Threads)
if(BUILD_TESTS)
enable_testing()
set (HIDRA2_MINIMUM_COVERAGE 70)
find_package (Threads)
endif()
function(gtest target test_source_files test_libraries)
if(BUILD_TESTS)
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
add_executable(test-${target} ${test_source_files})
target_link_libraries(test-${target} gtest gtest_main ${CMAKE_THREAD_LIBS_INIT})
......@@ -26,4 +28,5 @@ function(gtest target test_source_files test_libraries)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} PARENT_SCOPE)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} PARENT_SCOPE)
endif()
endif()
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment