Skip to content

Conversation

@cia1099
Copy link

@cia1099 cia1099 commented Jul 12, 2025

There is Error occur when build with NDK:
CMake Error: try_run() invoked in cross-compiling mode, please set the following cache variables appropriately:
HAVE_GNU_STRERROR_R_EXITCODE (advanced)

@sjinks sjinks requested a review from Copilot July 12, 2025 17:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR works around cross-compiling detection errors and standardizes the build output.

  • Defines HAVE_GNU_STRERROR_R_EXITCODE and HAVE_GNU_STRERROR_R_COMPILED to bypass try_run() in cross-compiling mode
  • Forces CMAKE_BUILD_TYPE to Release
  • Enables BUILD_SHARED_LIBS by default
Comments suppressed due to low confidence (2)

CMakeLists.txt:11

  • [nitpick] Unconditionally setting CMAKE_BUILD_TYPE forces a Release build and prevents users from selecting other build types; consider allowing overrides via a cached option or command-line flag.
set(CMAKE_BUILD_TYPE Release)

CMakeLists.txt:12

  • [nitpick] Forcing BUILD_SHARED_LIBS reduces flexibility for consumers who may need a static library; consider making this an option or honoring user-specified values.
set(BUILD_SHARED_LIBS ON)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@cia1099
Copy link
Author

cia1099 commented Jul 13, 2025

I am highly recommend to set build release mode and shared library as default, because user never care this third party library executable debug for break point and any log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant