-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
85 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index b3f376c..8e6d06a 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -60,7 +60,10 @@ if(NATS_BUILD_LIB_SHARED) | ||
target_include_directories(nats PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include>) | ||
- install(TARGETS nats EXPORT cnats-targets DESTINATION ${NATS_LIBDIR}) | ||
+ install(TARGETS nats EXPORT cnats-targets | ||
+ ARCHIVE DESTINATION lib | ||
+ LIBRARY DESTINATION lib | ||
+ RUNTIME DESTINATION bin) | ||
install(EXPORT cnats-targets | ||
NAMESPACE cnats:: | ||
FILE cnats-targets.cmake | ||
@@ -72,7 +75,10 @@ if(NATS_BUILD_LIB_STATIC) | ||
target_include_directories(nats_static PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include>) | ||
- install(TARGETS nats_static EXPORT cnats-targets ARCHIVE DESTINATION ${NATS_LIBDIR}) | ||
+ install(TARGETS nats_static EXPORT cnats-targets | ||
+ ARCHIVE DESTINATION lib | ||
+ LIBRARY DESTINATION lib | ||
+ RUNTIME DESTINATION bin) | ||
install(EXPORT cnats-targets | ||
NAMESPACE cnats:: | ||
FILE cnats-targets.cmake | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 65fee5a..3731b86 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -62,7 +62,10 @@ if(NATS_BUILD_LIB_SHARED) | ||
target_include_directories(nats PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include>) | ||
- install(TARGETS nats EXPORT cnats-targets DESTINATION ${NATS_LIBDIR}) | ||
+ install(TARGETS nats EXPORT cnats-targets | ||
+ ARCHIVE DESTINATION lib | ||
+ LIBRARY DESTINATION lib | ||
+ RUNTIME DESTINATION bin) | ||
install(EXPORT cnats-targets | ||
NAMESPACE cnats:: | ||
FILE cnats-targets.cmake | ||
@@ -76,7 +79,10 @@ if(NATS_BUILD_LIB_STATIC) | ||
target_include_directories(nats_static PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include>) | ||
- install(TARGETS nats_static EXPORT cnats-targets ARCHIVE DESTINATION ${NATS_LIBDIR}) | ||
+ install(TARGETS nats_static EXPORT cnats-targets | ||
+ ARCHIVE DESTINATION lib | ||
+ LIBRARY DESTINATION lib | ||
+ RUNTIME DESTINATION bin) | ||
install(EXPORT cnats-targets | ||
NAMESPACE cnats:: | ||
FILE cnats-targets.cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Subject: [PATCH] [FIXED] Build: failure with Android NDK | ||
|
||
When building against Android NDK testsuit compilation fails due to | ||
missing execinfo.h/backtrace implementation in platforms with id less | ||
than 33. Because this is only in tests just checking for Android should | ||
be enough to keep things simple. | ||
--- | ||
test/test.c | 10 ++++++++++ | ||
1 file changed, 10 insertions(+) | ||
|
||
diff --git a/test/test.c b/test/test.c | ||
index 1919af2..9b20774 100644 | ||
--- a/test/test.c | ||
+++ b/test/test.c | ||
@@ -37025,12 +37025,22 @@ void test_StanSubTimeout(void) | ||
|
||
#ifndef _WIN32 | ||
static void _sigsegv_handler(int sig) { | ||
+ | ||
+// Android doesn't support backtrace before API Level 33. | ||
+// Because this is for tests it's good enough to check | ||
+// for Android only, until there is need for a better solution. | ||
+#ifndef ANDROID | ||
void *array[20]; | ||
int size = backtrace(array, 20); | ||
+#endif // ANDROID | ||
|
||
// print out all the frames to stderr | ||
fprintf(stderr, "Error: signal %d:\n", sig); | ||
+ | ||
+#ifndef ANDROID | ||
backtrace_symbols_fd(array, size, STDERR_FILENO); | ||
+#endif // ANDROID | ||
+ | ||
exit(1); | ||
} | ||
#endif // _WIN32 | ||
-- | ||
2.45.2.windows.1 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters