-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
allow defining SENTRY_SDK_NAME
externally
#677
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the #endif
was missing ;-)
Lets check if this works when integrated with the sentry-java
build file.
I think it should be possible to just add that compile definiton to the sub-project there, otherwise you would actually need to make that a cmake option.
Co-authored-by: Arpad Borsos <swatinem@swatinem.de>
I spent more time than I'm willing to admit on this:
I suspect that because of So I'm proposing a different solution, likely better anyway as it'll be less inviting for custom sdk names by folks compiling directly: |
No change needed in the Android repo |
I'll fix the tests during the week |
Another approch would be something like. #my_cool_project/Cmakelists.txt
...
set(SENTRY_SDK_NAME "another-sdk-name")
add_subdirectory(sentry-native)
... #my_cool_project/sentry-native/Cmakelists.txt
...
if(DEFINED SENTRY_SDK_NAME)
target_compile_definitions(sentry PRIVATE SENTRY_SDK_NAME="${SENTRY_SDK_NAME}")
endif()
... //my_cool_project/sentry-native/include/sentry.h
...
#if !defined(SENTRY_SDK_NAME)
# define SENTRY_SDK_NAME "sentry.native"
#endif
... |
1c9ce92
to
f21aaa9
Compare
On a second thought I believe it's best if it's not 'configurable' as we don't want custom values to be pass in here resulting in different variations. The Android case is a special one |
@Swatinem can we cut a release to get this into the Android SDK? Thanks. |
Is this a feasible solution to this issue? getsentry/sentry-java#1901
That assumes we can define
SENTRY_SDK_NAME
in the NDK CMakeLists or Gradle