build: Mark dependency includes as SYSTEM

It is not really our business to debug python, boost, or our other
dependencies. Mark them as system includes.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
Adam C. Emerson 2017-11-03 15:14:35 -04:00
parent 15e0224441
commit 8d4a07f89f
10 changed files with 27 additions and 26 deletions

View File

@ -65,12 +65,12 @@ include_directories(
${PROJECT_SOURCE_DIR}/src)
if(OFED_PREFIX)
include_directories(${OFED_PREFIX}/include)
include_directories(SYSTEM ${OFED_PREFIX}/include)
link_directories(${OFED_PREFIX}/lib)
endif()
if(FREEBSD)
include_directories(/usr/local/include)
include_directories(SYSTEM /usr/local/include)
link_directories(/usr/local/lib)
list(APPEND CMAKE_REQUIRED_INCLUDES /usr/local/include)
endif(FREEBSD)
@ -258,7 +258,7 @@ option(WITH_EMBEDDED "build the embedded ceph daemon library" ON)
option(WITH_LEVELDB "LevelDB is here" ON)
if(WITH_LEVELDB)
if(LEVELDB_PREFIX)
include_directories(${LEVELDB_PREFIX}/include)
include_directories(SYSTEM ${LEVELDB_PREFIX}/include)
link_directories(${LEVELDB_PREFIX}/lib)
endif()
find_package(leveldb REQUIRED)
@ -354,7 +354,7 @@ endif(WITH_DPDK)
option(WITH_BLKIN "Use blkin to emit LTTng tracepoints for Zipkin" OFF)
if(WITH_BLKIN)
set(BLKIN_LIBRARIES blkin ${LTTNGUST_LIBRARIES} lttng-ust-fork)
include_directories(src/blkin/blkin-lib)
include_directories(SYSTEM src/blkin/blkin-lib)
endif(WITH_BLKIN)
#option for RGW

View File

@ -363,7 +363,7 @@ add_library(crush_objs OBJECT ${crush_srcs})
add_subdirectory(json_spirit)
include_directories("${CMAKE_SOURCE_DIR}/src/xxHash")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/xxHash")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/rapidjson/include")
set(GMOCK_INCLUDE_DIRS
@ -375,7 +375,7 @@ include_directories("${CMAKE_SOURCE_DIR}/src/dmclock/src")
include_directories("${CMAKE_SOURCE_DIR}/src/dmclock/support/src")
# needed for source files that friend unit tests (e.g., using FRIEND_TEST)
include_directories("${CMAKE_SOURCE_DIR}/src/googletest/googletest/include")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/googletest/googletest/include")
set(xio_common_srcs)
if(HAVE_XIO)
@ -727,7 +727,7 @@ if (WITH_MGR)
mgr/mgr_commands.cc)
add_executable(ceph-mgr ${mgr_srcs}
$<TARGET_OBJECTS:heap_profiler_objs>)
target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
target_include_directories(ceph-mgr SYSTEM PRIVATE "${PYTHON_INCLUDE_DIRS}")
target_link_libraries(ceph-mgr osdc client global-static common
Boost::python ${PYTHON_LIBRARIES} ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${ALLOC_LIBS})
install(TARGETS ceph-mgr DESTINATION bin)
@ -1039,14 +1039,14 @@ endif(WITH_KVS)
if(WITH_RADOSGW)
set(civetweb_common_files civetweb/src/civetweb.c)
add_library(civetweb_common_objs OBJECT ${civetweb_common_files})
target_include_directories(civetweb_common_objs PRIVATE
target_include_directories(civetweb_common_objs SYSTEM PRIVATE
"${CMAKE_SOURCE_DIR}/src/civetweb/include")
set_property(TARGET civetweb_common_objs
APPEND PROPERTY COMPILE_DEFINITIONS USE_IPV6=1)
if(USE_OPENSSL)
set_property(TARGET civetweb_common_objs
APPEND PROPERTY COMPILE_DEFINITIONS NO_SSL_DL=1)
target_include_directories(civetweb_common_objs PRIVATE
target_include_directories(civetweb_common_objs SYSTEM PRIVATE
"${SSL_INCLUDE_DIR}")
endif(USE_OPENSSL)
if (LIBSSL_SONAME)

View File

@ -40,7 +40,7 @@ endif(HAVE_INTEL_SSE4_1 AND HAVE_BETTER_YASM_ELF64 AND (NOT APPLE))
add_library(ceph_zlib SHARED ${zlib_sources})
add_dependencies(ceph_zlib ${CMAKE_SOURCE_DIR}/src/ceph_ver.h)
target_link_libraries(ceph_zlib ${ZLIB_LIBRARIES})
target_include_directories(ceph_zlib PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include")
target_include_directories(ceph_zlib SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include")
set_target_properties(ceph_zlib PROPERTIES
VERSION 2.0.0
SOVERSION 2
@ -49,6 +49,6 @@ install(TARGETS ceph_zlib DESTINATION ${compressor_plugin_dir})
if(WITH_EMBEDDED)
add_library(cephd_compressor_zlib STATIC ${zlib_sources})
target_include_directories(cephd_compressor_zlib PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include")
target_include_directories(cephd_compressor_zlib SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/isa-l/include")
set_target_properties(cephd_compressor_zlib PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
endif()

View File

@ -3,8 +3,8 @@
set(erasure_plugin_dir ${CMAKE_INSTALL_PKGLIBDIR}/erasure-code)
#jerasure subdir must be before shec so jerasure & neon obj libs are declared
include_directories(jerasure/jerasure/include)
include_directories(jerasure/gf-complete/include)
include_directories(SYSTEM jerasure/jerasure/include)
include_directories(SYSTEM jerasure/gf-complete/include)
include_directories(jerasure)
# legacy jerasure flavors. these are left here for backward compatibility

View File

@ -9,8 +9,8 @@ endif (WITH_LEVELDB)
add_library(kv_objs OBJECT ${kv_srcs})
add_library(kv STATIC $<TARGET_OBJECTS:kv_objs>)
target_include_directories(kv_objs BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR})
target_include_directories(kv BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR})
target_include_directories(kv_objs SYSTEM BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR})
target_include_directories(kv SYSTEM BEFORE PUBLIC ${ROCKSDB_INCLUDE_DIR})
target_link_libraries(kv ${LEVELDB_LIBRARIES} ${ROCKSDB_LIBRARIES} ${ALLOC_LIBS} ${SNAPPY_LIBRARIES} ${ZLIB_LIBRARIES})
# rocksdb detects bzlib and lz4 in its Makefile, which forces us to do the same.

View File

@ -57,7 +57,7 @@ if(HAVE_LIBZFS)
add_library(os_zfs_objs OBJECT
filestore/ZFSFileStoreBackend.cc
fs/ZFS.cc)
target_include_directories(os_zfs_objs PRIVATE
target_include_directories(os_zfs_objs SYSTEM PRIVATE
${ZFS_INCLUDE_DIRS})
list(APPEND libos_srcs $<TARGET_OBJECTS:os_zfs_objs>)
endif()
@ -72,7 +72,7 @@ add_library(os STATIC ${libos_srcs} $<TARGET_OBJECTS:kv_objs>)
if(WITH_BLUEFS)
add_library(bluefs SHARED
bluestore/BlueRocksEnv.cc)
target_include_directories(bluefs PUBLIC ${ROCKSDB_INCLUDE_DIR})
target_include_directories(bluefs SYSTEM PUBLIC ${ROCKSDB_INCLUDE_DIR})
target_link_libraries(bluefs global)
install(TARGETS bluefs DESTINATION lib)
endif(WITH_BLUEFS)
@ -94,6 +94,7 @@ if(WITH_SPDK)
${SPDK_LIBRARIES}
${DPDK_LIBRARIES})
target_include_directories(os
SYSTEM
PRIVATE
${DPDK_INCLUDE_DIR})
endif(WITH_SPDK)
@ -118,7 +119,7 @@ if(WITH_BLUESTORE)
endif()
if(WITH_SPDK)
include_directories("${CMAKE_SOURCE_DIR}/src/spdk/include")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/spdk/include")
add_custom_target(build_spdk
COMMAND
$(MAKE) DPDK_INC_DIR=${DPDK_INCLUDE_DIR}
@ -159,7 +160,7 @@ if(WITH_PMEM)
set_target_properties(pmem PROPERTIES
IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/src/nvml/src/nondebug/libpmem.a")
target_link_libraries(os pmem)
target_include_directories(os PRIVATE "${CMAKE_BINARY_DIR}/src/nvml/src/include")
target_include_directories(os SYSTEM PRIVATE "${CMAKE_BINARY_DIR}/src/nvml/src/include")
endif(WITH_PMEM)
if(WITH_LTTNG AND WITH_EVENTTRACE)

View File

@ -141,7 +141,7 @@ add_library(rgw_a STATIC ${rgw_a_srcs})
add_dependencies(rgw_a civetweb_h)
target_include_directories(rgw_a PUBLIC
target_include_directories(rgw_a SYSTEM PUBLIC
"../Beast/include"
${FCGI_INCLUDE_DIR}
"../rapidjson/include"
@ -258,7 +258,7 @@ if(WITH_EMBEDDED)
include(MergeStaticLibraries)
add_library(cephd_rgw_base STATIC rgw_main.cc ${radosgw_admin_srcs})
if(WITH_RADOSGW_FCGI_FRONTEND)
target_include_directories(cephd_rgw_base PUBLIC ${FCGI_INCLUDE_DIR})
target_include_directories(cephd_rgw_base SYSTEM PUBLIC ${FCGI_INCLUDE_DIR})
endif()
set_target_properties(cephd_rgw_base PROPERTIES COMPILE_DEFINITIONS BUILDING_FOR_EMBEDDED)
merge_static_libraries(cephd_rgw cephd_rgw_base rgw_a radosgw_a)

View File

@ -279,7 +279,7 @@ add_executable(ceph_test_librgw_file
set_target_properties(ceph_test_librgw_file PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
if(WITH_RADOSGW_FCGI_FRONTEND)
target_include_directories(ceph_test_librgw_file PRIVATE ${FCGI_INCLUDE_DIR})
target_include_directories(ceph_test_librgw_file SYSTEM PRIVATE ${FCGI_INCLUDE_DIR})
endif(WITH_RADOSGW_FCGI_FRONTEND)
target_link_libraries(ceph_test_librgw_file
rgw
@ -324,7 +324,7 @@ add_executable(ceph_test_librgw_file_nfsns
set_target_properties(ceph_test_librgw_file_nfsns PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
if(WITH_RADOSGW_FCGI_FRONTEND)
target_include_directories(ceph_test_librgw_file_nfsns PRIVATE ${FCGI_INCLUDE_DIR})
target_include_directories(ceph_test_librgw_file_nfsns SYSTEM PRIVATE ${FCGI_INCLUDE_DIR})
endif(WITH_RADOSGW_FCGI_FRONTEND)
target_link_libraries(ceph_test_librgw_file_nfsns
rgw

View File

@ -173,8 +173,8 @@ target_link_libraries(unittest_erasure_code_example
)
set_target_properties(unittest_erasure_code_example PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
include_directories(${CMAKE_SOURCE_DIR}/src/erasure-code/jerasure/jerasure/include)
include_directories(${CMAKE_SOURCE_DIR}/src/erasure-code//jerasure/gf-complete/include)
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/src/erasure-code/jerasure/jerasure/include)
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/src/erasure-code//jerasure/gf-complete/include)
# unittest_erasure_code_jerasure
add_executable(unittest_erasure_code_jerasure

View File

@ -1,5 +1,5 @@
add_library(fio_ceph_objectstore SHARED fio_ceph_objectstore.cc)
target_include_directories(fio_ceph_objectstore PUBLIC ${FIO_INCLUDE_DIR})
target_include_directories(fio_ceph_objectstore SYSTEM PUBLIC ${FIO_INCLUDE_DIR})
# prevent fio from adding a 'typedef int bool'
set(FIO_CFLAGS "-DCONFIG_HAVE_BOOL")