File: GraphGenlib_link_math.patch

package info (click to toggle)
combblas 2.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 190,488 kB
  • sloc: cpp: 55,918; ansic: 25,134; sh: 3,691; makefile: 548; csh: 66; python: 49; perl: 21
file content (16 lines) | stat: -rw-r--r-- 671 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: combblas/graph500-1.2/generator/CMakeLists.txt
===================================================================
--- combblas.orig/graph500-1.2/generator/CMakeLists.txt	2025-09-28 01:26:07.907454273 +0200
+++ combblas/graph500-1.2/generator/CMakeLists.txt	2025-09-28 01:26:07.899741795 +0200
@@ -10,5 +10,11 @@
   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)