Skip to content

Commit a1a1381

Browse files
Merge pull request #245 from GraphBLAS/v1.1_branch
minor build updates for LAGraph 1.1.1
2 parents c6dcf33 + 1614afc commit a1a1381

File tree

7 files changed

+39
-16
lines changed

7 files changed

+39
-16
lines changed

CMakeLists.txt

+11-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@
3939
cmake_minimum_required ( VERSION 3.20 ) # LAGraph can be built stand-alone
4040

4141
# version of LAGraph
42-
set ( LAGraph_DATE "Dec 30, 2023" )
42+
set ( LAGraph_DATE "Jan 10, 2024" )
4343
set ( LAGraph_VERSION_MAJOR 1 CACHE STRING "" FORCE )
4444
set ( LAGraph_VERSION_MINOR 1 CACHE STRING "" FORCE )
45-
set ( LAGraph_VERSION_SUB 0 CACHE STRING "" FORCE )
45+
set ( LAGraph_VERSION_SUB 1 CACHE STRING "" FORCE )
4646

4747
message ( STATUS "Building LAGraph version: v"
4848
${LAGraph_VERSION_MAJOR}.
@@ -76,6 +76,9 @@ configure_file (
7676
"${PROJECT_SOURCE_DIR}/include/LAGraph.h"
7777
NEWLINE_STYLE LF )
7878

79+
include ( CheckSymbolExists )
80+
check_symbol_exists ( fmax "math.h" NO_LIBM )
81+
7982
#-------------------------------------------------------------------------------
8083
# code coverage and build type
8184
#-------------------------------------------------------------------------------
@@ -167,7 +170,11 @@ if ( COVERAGE )
167170
message ( STATUS "OpenMP disabled for test coverage" )
168171
else ( )
169172
if ( LAGRAPH_USE_OPENMP )
170-
find_package ( OpenMP GLOBAL )
173+
if ( CMAKE_VERSION VERSION_LESS 3.24 )
174+
find_package ( OpenMP COMPONENTS C )
175+
else ( )
176+
find_package ( OpenMP COMPONENTS C GLOBAL )
177+
endif ( )
171178
if ( OpenMP_C_FOUND AND BUILD_STATIC_LIBS )
172179
list ( APPEND LAGRAPH_STATIC_LIBS ${OpenMP_C_LIBRARIES} )
173180
endif ( )
@@ -354,7 +361,7 @@ install ( FILES
354361

355362
if ( NOT MSVC )
356363
if ( BUILD_STATIC_LIBS )
357-
if ( NOT WIN32 )
364+
if ( NOT NO_LIBM )
358365
list ( APPEND LAGRAPH_STATIC_LIBS "m" )
359366
endif ( )
360367
endif ( )

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Jan 10, 2024: version 1.1.1
2+
3+
* minor update to build system
4+
15
Dec 30, 2023: version 1.1.0
26

37
* major change to build system: by Markus Mützel

cmake_modules/SuiteSparsePolicy.cmake

+13
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,19 @@ message ( STATUS "Build type: ${CMAKE_BUILD_TYPE} ")
247247

248248
set ( CMAKE_INCLUDE_CURRENT_DIR ON )
249249

250+
#-------------------------------------------------------------------------------
251+
# Workaround for math.h on old macOS
252+
#-------------------------------------------------------------------------------
253+
254+
if ( APPLE AND CMAKE_SYSTEM_VERSION VERSION_LESS 11 )
255+
# Older versions of math.h on the Mac define Real and Imag, which
256+
# conflict with the internal use of those symbols in CHOLMOD, KLU, SPQR,
257+
# UMFPACK, and ParU.
258+
# This can be disabled with -D__NOEXTENSIONS__
259+
message ( STATUS "MacOS: disable extensions in math.h" )
260+
add_compile_definitions ( "__NOEXTENSIONS__" )
261+
endif ( )
262+
250263
#-------------------------------------------------------------------------------
251264
# check if Fortran is available and enabled
252265
#-------------------------------------------------------------------------------

config/LAGraphConfig.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ endif ( )
5353

5454
# Look for OpenMP
5555
if ( @LAGRAPH_HAS_OPENMP@ AND NOT OpenMP_C_FOUND )
56-
find_dependency ( OpenMP )
56+
find_dependency ( OpenMP COMPONENTS C )
5757
if ( NOT OpenMP_C_FOUND )
5858
set ( _dependencies_found OFF )
5959
endif ( )

include/LAGraph.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
// See also the LAGraph_Version utility method, which returns these values.
3838
// These definitions are derived from LAGraph/CMakeLists.txt.
3939

40-
#define LAGRAPH_DATE "Dec 30, 2023"
40+
#define LAGRAPH_DATE "Jan 10, 2024"
4141
#define LAGRAPH_VERSION_MAJOR 1
4242
#define LAGRAPH_VERSION_MINOR 1
43-
#define LAGRAPH_VERSION_UPDATE 0
43+
#define LAGRAPH_VERSION_UPDATE 1
4444

4545
//==============================================================================
4646
// include files and helper macros

src/CMakeLists.txt

+7-8
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ include_directories ( utility )
1717

1818
file ( GLOB LAGRAPH_LIB_SOURCES "utility/*.c" "algorithm/*.c" )
1919

20-
if ( WIN32 )
21-
set ( M_LIB "" )
22-
else ( )
23-
set ( M_LIB "m" )
24-
endif ( )
25-
2620
#-------------------------------------------------------------------------------
2721
# dynamic lagraph library properties
2822
#-------------------------------------------------------------------------------
@@ -42,7 +36,10 @@ if ( BUILD_SHARED_LIBS )
4236
set_target_properties ( LAGraph PROPERTIES EXPORT_NO_SYSTEM ON )
4337
endif ( )
4438

45-
target_link_libraries ( LAGraph PRIVATE GraphBLAS::GraphBLAS ${M_LIB} )
39+
target_link_libraries ( LAGraph PRIVATE GraphBLAS::GraphBLAS )
40+
if ( NOT NO_LIBM )
41+
target_link_libraries ( LAGraph PRIVATE "m" )
42+
endif ( )
4643

4744
target_include_directories ( LAGraph PUBLIC
4845
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
@@ -80,7 +77,9 @@ if ( BUILD_STATIC_LIBS )
8077
else ( )
8178
target_link_libraries ( LAGraph_static PUBLIC GraphBLAS::GraphBLAS )
8279
endif ( )
83-
target_link_libraries ( LAGraph_static PUBLIC ${M_LIB} )
80+
if ( NOT NO_LIBM )
81+
target_link_libraries ( LAGraph_static PUBLIC "m" )
82+
endif ( )
8483

8584
target_include_directories ( LAGraph_static PUBLIC
8685
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>

src/benchmark/tc_demo.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int main (int argc, char **argv)
149149
// warmup for more accurate timing, and also print # of triangles
150150
double ttot = LAGraph_WallClockTime ( ) ;
151151
printf ("\nwarmup method: ") ;
152-
int presort = LAGr_TriangleCount_AutoSort ; // = 0 (auto selection)
152+
LAGr_TriangleCount_Presort presort = LAGr_TriangleCount_AutoSort ;
153153
print_method (stdout, 6, presort) ;
154154

155155
// warmup method:

0 commit comments

Comments
 (0)