File: GraphGenlib_link_math.patch

package info (click to toggle)
combblas 2.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 190,476 kB
  • sloc: cpp: 55,912; ansic: 25,134; sh: 3,691; makefile: 548; csh: 66; python: 49; perl: 21
file content (17 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: combblas/graph500-1.2/generator/CMakeLists.txt
===================================================================
--- combblas.orig/graph500-1.2/generator/CMakeLists.txt	2021-01-11 15:38:11.604937476 +1100
+++ combblas/graph500-1.2/generator/CMakeLists.txt	2021-01-11 15:39:43.133902527 +1100
@@ -7,6 +7,12 @@
   target_compile_options(GraphGenlib PRIVATE "-restrict")
 endif()
 
+include(CheckLibraryExists)
+CHECK_LIBRARY_EXISTS(m sqrt "" HAVE_LIB_M)
+if (HAVE_LIB_M)
+  target_link_libraries(GraphGenlib PUBLIC m)
+endif (HAVE_LIB_M)
+
 install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 install(TARGETS GraphGenlib EXPORT CombBLASTargets
   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}