Skip to content

Commit

Permalink
add patch with define
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonov548 committed Jan 8, 2024
1 parent fbec706 commit 843c0d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ set(IGRAPH_INTEGER_SIZE 32)
add_subdirectory(vendor/igraph)
add_subdirectory(vendor/igraph-cpp)

execute_process(
COMMAND git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/igraph.patch
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/vendor/igraph
)

add_subdirectory(src)

if (ENABLE_TESTS)
Expand Down
17 changes: 17 additions & 0 deletions cmake/igraph.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/core/error.c b/src/core/error.c
index 6e928cc00..9abfc693c 100644
--- a/src/core/error.c
+++ b/src/core/error.c
@@ -169,9 +169,9 @@ igraph_error_t igraph_error(const char *reason, const char *file, int line,

if (igraph_i_error_handler) {
igraph_i_error_handler(reason, file, line, igraph_errno);
-#ifndef USING_R
- } else {
- igraph_error_handler_abort(reason, file, line, igraph_errno);
+#if !defined(USING_R) && !defined(__EMSCRIPTEN__)
+ } else {
+ igraph_error_handler_abort(reason, file, line, igraph_errno);
#endif
}
return igraph_errno;

0 comments on commit 843c0d7

Please sign in to comment.