ayaports/backports/crc32c/10-third-party.patch

68 lines
2.4 KiB
Diff

Author: Holger Jaekel <holger.jaekel@gmx.de>
Summary: ignore googletest, glog, and benchmark from the third-party folder
----
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@
# C++ standard can be overridden when this is used as a sub-project.
if(NOT CMAKE_CXX_STANDARD)
# This project requires C++11.
- set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif(NOT CMAKE_CXX_STANDARD)
@@ -187,26 +187,8 @@
# CPU cycles on the CI.
set(BUILD_TESTING_SAVED "${BUILD_TESTING}")
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
- add_subdirectory("third_party/glog" EXCLUDE_FROM_ALL)
set(BUILD_TESTING "${BUILD_TESTING_SAVED}" CACHE BOOL "" FORCE)
- # glog triggers deprecation warnings on OSX.
- # https://github.com/google/glog/issues/185
- if(CRC32C_HAVE_NO_DEPRECATED)
- set_property(TARGET glog APPEND PROPERTY COMPILE_OPTIONS -Wno-deprecated)
- endif(CRC32C_HAVE_NO_DEPRECATED)
-
- # glog triggers sign comparison warnings on gcc.
- if(CRC32C_HAVE_NO_SIGN_COMPARE)
- set_property(TARGET glog APPEND PROPERTY COMPILE_OPTIONS -Wno-sign-compare)
- endif(CRC32C_HAVE_NO_SIGN_COMPARE)
-
- # glog triggers unused parameter warnings on clang.
- if(CRC32C_HAVE_NO_UNUSED_PARAMETER)
- set_property(TARGET glog
- APPEND PROPERTY COMPILE_OPTIONS -Wno-unused-parameter)
- endif(CRC32C_HAVE_NO_UNUSED_PARAMETER)
-
set(CRC32C_TESTS_BUILT_WITH_GLOG 1)
endif(CRC32C_USE_GLOG)
@@ -314,17 +296,6 @@
set(install_gtest OFF)
set(install_gmock OFF)
- # This project is tested using GoogleTest.
- add_subdirectory("third_party/googletest")
-
- # GoogleTest triggers a missing field initializers warning.
- if(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS)
- set_property(TARGET gtest
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- set_property(TARGET gmock
- APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
- endif(CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS)
-
add_executable(crc32c_tests "")
target_sources(crc32c_tests
PRIVATE
@@ -385,7 +356,6 @@
# This project uses Google benchmark for benchmarking.
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
set(BENCHMARK_ENABLE_EXCEPTIONS OFF CACHE BOOL "" FORCE)
- add_subdirectory("third_party/benchmark")
target_link_libraries(crc32c_bench benchmark)
if(CRC32C_USE_GLOG)