Skip to content

Instantly share code, notes, and snippets.

@nwaniek
Created January 25, 2024 11:06
Show Gist options
  • Save nwaniek/eeff24b4048e34948104059550df6520 to your computer and use it in GitHub Desktop.
Save nwaniek/eeff24b4048e34948104059550df6520 to your computer and use it in GitHub Desktop.
add atomic library to link targets for giotto-ph when compiling with clang
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18bd949..c4e10b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,10 @@ else()
endif()
target_link_libraries(gph_ripser PRIVATE ${JUNCTION_ALL_LIBRARIES})
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ target_link_libraries(gph_ripser PRIVATE atomic)
+endif()
+
#######################################################################
# Ripser Lock Free - Coefficient enable #
@@ -75,6 +79,9 @@ else()
endif()
target_link_libraries(gph_ripser_coeff PRIVATE ${JUNCTION_ALL_LIBRARIES})
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ target_link_libraries(gph_ripser_coeff PRIVATE atomic)
+endif()
#######################################################################
# Collapser #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment