Skip to content

Commit

Permalink
fix build: android/termux/clang-17.0 (#736)
Browse files Browse the repository at this point in the history
* fix build: android/termux/clang-17.0

* Android build links with liblog in places
  • Loading branch information
keith-dev authored Jan 4, 2024
1 parent 921ce6f commit 6aed71e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/crow/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -1675,7 +1675,7 @@ namespace crow
}
else
{
#if defined(__APPLE__) || defined(__MACH__) || defined(__FreeBSD__)
#if defined(__APPLE__) || defined(__MACH__) || defined(__FreeBSD__) || defined(__ANDROID__)
o = std::unique_ptr<object>(new object(value));
#else
(*o) = value;
Expand Down
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ add_executable(unittest ${TEST_SRCS})
target_link_libraries(unittest Crow::Crow)
add_warnings_optimizations(unittest)

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
target_link_libraries(unittest log)
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_target_properties(unittest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage")
target_link_libraries(unittest gcov)
Expand Down
4 changes: 4 additions & 0 deletions tests/ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ add_executable(ssltest ${TEST_SRCS})
target_link_libraries(ssltest Crow::Crow)
add_warnings_optimizations(ssltest)

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
target_link_libraries(ssltest log)
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_target_properties(ssltest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage")
target_link_libraries(ssltest gcov)
Expand Down

0 comments on commit 6aed71e

Please sign in to comment.