Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[faker-cxx] add new port #38583

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
17 changes: 13 additions & 4 deletions ports/faker-cxx/CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c0c1473..a85de65 100644
index a7c70d1..29f9692 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,12 +127,11 @@ install(EXPORT ${LIBRARY_NAME}-targets
FILE ${LIBRARY_NAME}-config.cmake
DESTINATION lib/cmake/${LIBRARY_NAME})
@@ -11,6 +11,8 @@ option(BUILD_FAKER_TESTS DEFAULT ON)

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++20 /permissive- /bigobj")
+elseif (ANDROID)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -stdlib=libc++ -fexperimental-library")
mostsignificant marked this conversation as resolved.
Show resolved Hide resolved
else ()
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW -Werror is nice for controlled environments (upstream development), but not appropriate for individual builds over a write range of environments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I removed it via the patch file. However, I might submit a PR for the original project to remove this, too and only enable it in their own CI/CD

@@ -110,12 +112,11 @@ target_include_directories(
INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include"
PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include")

-if (APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
+if (APPLE OR ANDROID OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
Expand Down