File: link_testlib_atomic.patch

package info (click to toggle)
nng 1.4.0-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 5,156 kB
  • sloc: ansic: 70,161; sh: 321; cpp: 62; makefile: 22
file content (19 lines) | stat: -rw-r--r-- 666 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: link testlib with atomic if needed
 Add it to NNG_LIBS if atomic library is detected.
Author: Laszlo Boszormenyi (GCS) <gcs@debian.org>
Last-Update: 2020-03-04

---

--- nng-1.3.0.orig/src/CMakeLists.txt
+++ nng-1.3.0/src/CMakeLists.txt
@@ -212,6 +212,9 @@ endforeach ()
 target_sources(${PROJECT_NAME} PRIVATE ${NNG_SRCS})
 
 if (NNG_TESTS)
+    if (NNG_HAVE_STDATOMIC)
+        list(APPEND NNG_LIBS -latomic)
+    endif ()
     target_sources(${PROJECT_NAME}_testlib PRIVATE ${NNG_SRCS})
     target_link_libraries(${PROJECT_NAME}_testlib PUBLIC ${NNG_LIBS})
     target_compile_definitions(${PROJECT_NAME}_testlib PUBLIC NNG_STATIC_LIB NNG_TEST_LIB)