Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[test] Include cpp-httplib as a system library
Browse files Browse the repository at this point in the history
This way it will not get warnings by linters and -Werror.
  • Loading branch information
tmpsantos committed Mar 23, 2020
1 parent 3e173e1 commit 1adc436
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ else()
COMPILE_OPTIONS
$<$<STREQUAL:${CMAKE_SYSTEM_NAME},iOS>:-Wno-shorten-64-to-32>
)
target_include_directories(
mbgl-test
PRIVATE ${PROJECT_SOURCE_DIR}/vendor/cpp-httplib
)
endif()

if(NOT DEFINED ENV{CI})
Expand Down Expand Up @@ -187,6 +183,7 @@ target_include_directories(
PUBLIC ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/test/include
)

include(${PROJECT_SOURCE_DIR}/vendor/cpp-httplib.cmake)
include(${PROJECT_SOURCE_DIR}/vendor/googletest.cmake)

if(CMAKE_SYSTEM_NAME STREQUAL iOS)
Expand All @@ -211,6 +208,7 @@ target_link_libraries(
Mapbox::Base::Extras::args
Mapbox::Base::pixelmatch-cpp
mbgl-compiler-options
mbgl-vendor-cpp-httplib
PUBLIC mbgl-core
)

Expand Down
12 changes: 12 additions & 0 deletions vendor/cpp-httplib.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if(TARGET mbgl-vendor-cpp-httplib)
return()
endif()

add_library(
mbgl-vendor-cpp-httplib INTERFACE
)

target_include_directories(
mbgl-vendor-cpp-httplib SYSTEM
INTERFACE ${CMAKE_CURRENT_LIST_DIR}/cpp-httplib
)

0 comments on commit 1adc436

Please sign in to comment.