diff --git a/CMakeLists.txt b/CMakeLists.txt index a16c38332..5511bfd6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,8 +262,8 @@ ENDIF() MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-copy" DEBUG RELEASE RELWITHDEBINFO MINSIZEREL) MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated-declarations" DEBUG RELEASE RELWITHDEBINFO MINSIZEREL) - MY_CHECK_AND_SET_COMPILER_FLAG("-Werror -Wall -Wextra") + SET (ENGINE_LDFLAGS "-Wl,--no-as-needed -Wl,--add-needed") SET (ENGINE_DT_LIB datatypes) SET (ENGINE_COMMON_LIBS messageqcpp loggingcpp configcpp idbboot boost_thread xml2 pthread rt ${ENGINE_DT_LIB}) diff --git a/primitives/blockcache/stats.cpp b/primitives/blockcache/stats.cpp index 6ce64dd59..f817c6d59 100644 --- a/primitives/blockcache/stats.cpp +++ b/primitives/blockcache/stats.cpp @@ -176,7 +176,6 @@ class StatMon sigset_t sigset; sigemptyset(&sigset); sigaddset(&sigset, SIGPIPE); - // sigaddset(&sigset, SIGUSR1); sigaddset(&sigset, SIGUSR2); pthread_sigmask(SIG_BLOCK, &sigset, 0); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 62b91a36e..1110e13e0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -29,6 +29,7 @@ if (WITH_UNITTESTS) #GoogleTest tests add_executable(rowgroup_tests rowgroup-tests.cpp) + target_compile_options(rowgroup_tests PRIVATE -Wno-sign-compare) add_dependencies(rowgroup_tests googletest) target_link_libraries(rowgroup_tests ${ENGINE_LDFLAGS} ${GTEST_LIBRARIES} ${ENGINE_EXEC_LIBS}) gtest_add_tests(TARGET rowgroup_tests TEST_PREFIX columnstore:) @@ -75,14 +76,14 @@ if (WITH_UNITTESTS) target_link_libraries(fair_threadpool_test ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${GTEST_LIBRARIES} processor dbbc) gtest_add_tests(TARGET fair_threadpool_test TEST_PREFIX columnstore:) - set_source_files_properties(counting_allocator.cpp PROPERTIES COMPILE_FLAGS "-Wno-sign-compare") add_executable(counting_allocator counting_allocator.cpp) + target_compile_options(counting_allocator PRIVATE -Wno-sign-compare) add_dependencies(counting_allocator googletest) target_link_libraries(counting_allocator ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${GTEST_LIBRARIES}) gtest_add_tests(TARGET counting_allocator TEST_PREFIX columnstore:) - set_source_files_properties(poolallocator.cpp PROPERTIES COMPILE_FLAGS "-Wno-sign-compare") add_executable(poolallocator poolallocator.cpp) + target_compile_options(poolallocator PRIVATE -Wno-sign-compare) add_dependencies(poolallocator googletest) target_link_libraries(poolallocator ${ENGINE_LDFLAGS} ${ENGINE_WRITE_LIBS} ${GTEST_LIBRARIES}) gtest_add_tests(TARGET poolallocator TEST_PREFIX columnstore:) @@ -101,7 +102,7 @@ if (WITH_UNITTESTS) add_test(NAME columnstore:brm_em_standalone COMMAND brm_em_standalone) set_tests_properties(columnstore:brm_em_standalone PROPERTIES DISABLED True) endif() -# -Werror=sign-compare + if (WITH_MICROBENCHMARKS AND (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")) find_package(benchmark REQUIRED) add_executable(primitives_scan_bench primitives_scan_bench.cpp) diff --git a/utils/messageqcpp/bytestream.cpp b/utils/messageqcpp/bytestream.cpp index 4c6cfa10d..5d6bde298 100644 --- a/utils/messageqcpp/bytestream.cpp +++ b/utils/messageqcpp/bytestream.cpp @@ -606,7 +606,6 @@ void ByteStream::swap(ByteStream& rhs) std::swap(allocator, rhs.allocator); } -// WIP use allocator ifstream& operator>>(ifstream& ifs, ByteStream& bs) { int ifs_len;