项目文件夹

文件
egolearner 51c6d9e0ec chore(thirdparty): mark third-party include paths as SYSTEM (#413)
Add SYSTEM to target_include_directories in vendored CMake wrappers and
set INTERFACE_SYSTEM_INCLUDE_DIRECTORIES on imported / sub-project
targets so warnings from third-party headers no longer surface in our
build output. Introduces a mark_target_includes_system() helper in
cmake/utils.cmake (resolves aliases, skips missing targets) used by the
upstream-add_subdirectory wrappers (glog, gflags, googletest, yaml-cpp,
protobuf, antlr).
2026-05-19 15:03:07 +08:00

17 行
688 B
CMake

set(SPARSE_SRC "${CMAKE_CURRENT_SOURCE_DIR}/sparseconfig.h")
set(SPARSE_DST "${CMAKE_CURRENT_SOURCE_DIR}/sparsehash-2.0.4/src/sparsehash/internal/sparseconfig.h")
get_filename_component(DESTINATION_DIR "${SPARSE_DST}" DIRECTORY)
if(NOT EXISTS "${SPARSE_DST}")
file(COPY "${SPARSE_SRC}" DESTINATION "${DESTINATION_DIR}")
endif()
if(MSVC)
set(SPARSEHASH_WINDOWS_PATCH ${CMAKE_CURRENT_SOURCE_DIR}/sparsehash.windows.patch)
apply_patch_once("sparsehash.windows.patch" "${DESTINATION_DIR}" "${SPARSEHASH_WINDOWS_PATCH}")
endif()
add_library(sparsehash INTERFACE)
target_include_directories(
sparsehash SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/sparsehash-2.0.4/src/"
)