From 29bdc1a46fdbdedc277f49fe8651d9b68d067b38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Fri, 1 Apr 2022 19:26:13 -0400
Subject: [PATCH] Revert "cmake: check atomic for `RISC-V` architecture"

Reason for partial revert:
Adding the atomic library is meant by CheckAtomic
to be automatic through CMAKE_REQUIRED_LIBRARIES.
---
 CMakeLists.txt | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6cd7850d..bc971857 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -320,9 +320,6 @@ if (OPENDHT_STATIC)
             PUBLIC ${CMAKE_THREAD_LIBS_INIT} ${GNUTLS_LIBRARIES} ${Nettle_STATIC_LIBRARIES}
                    ${Jsoncpp_STATIC_LIBRARIES} ${FMT_LIBRARY} ${HTTP_PARSER_LIBRARY}
                    ${OPENSSL_STATIC_LIBRARIES})
-        if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
-            target_link_libraries(opendht-static PUBLIC atomic)
-        endif ()
     else ()
         if (OPENDHT_TOOLS)
             function (add_obj_lib name libfile)
@@ -396,9 +393,6 @@ if (OPENDHT_SHARED)
             PRIVATE ${GNUTLS_LIBRARIES} ${Nettle_LIBRARIES}
                     ${Jsoncpp_LIBRARIES}
                     ${FMT_LIBRARY} ${HTTP_PARSER_LIBRARY} ${argon2_LIBRARIES})
-        if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
-            target_link_libraries(opendht PUBLIC atomic)
-        endif ()
     endif ()
 
     install (TARGETS opendht DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT opendht)
@@ -503,9 +497,6 @@ if (OPENDHT_TESTS)
        ${GNUTLS_LIBRARIES}
        ${Jsoncpp_LIBRARIES}
     )
-    if (NOT HAVE_CXX_ATOMICS_WITHOUT_LIB)
-        target_link_libraries(opendht_unit_tests atomic)
-    endif ()
     if (OPENDHT_PROXY_OPENSSL)
         target_link_libraries(opendht_unit_tests ${OPENSSL_LIBRARIES})
     endif()
-- 
GitLab