Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor build updates for LAGraph 1.1.1 #245

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
cmake_minimum_required ( VERSION 3.20 ) # LAGraph can be built stand-alone

# version of LAGraph
set ( LAGraph_DATE "Dec 30, 2023" )
set ( LAGraph_DATE "Jan 10, 2024" )
set ( LAGraph_VERSION_MAJOR 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_MINOR 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_SUB 0 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_SUB 1 CACHE STRING "" FORCE )

message ( STATUS "Building LAGraph version: v"
${LAGraph_VERSION_MAJOR}.
Expand Down Expand Up @@ -76,6 +76,9 @@ configure_file (
"${PROJECT_SOURCE_DIR}/include/LAGraph.h"
NEWLINE_STYLE LF )

include ( CheckSymbolExists )
check_symbol_exists ( fmax "math.h" NO_LIBM )

#-------------------------------------------------------------------------------
# code coverage and build type
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -167,7 +170,11 @@ if ( COVERAGE )
message ( STATUS "OpenMP disabled for test coverage" )
else ( )
if ( LAGRAPH_USE_OPENMP )
find_package ( OpenMP GLOBAL )
if ( CMAKE_VERSION VERSION_LESS 3.24 )
find_package ( OpenMP COMPONENTS C )
else ( )
find_package ( OpenMP COMPONENTS C GLOBAL )
endif ( )
if ( OpenMP_C_FOUND AND BUILD_STATIC_LIBS )
list ( APPEND LAGRAPH_STATIC_LIBS ${OpenMP_C_LIBRARIES} )
endif ( )
Expand Down Expand Up @@ -354,7 +361,7 @@ install ( FILES

if ( NOT MSVC )
if ( BUILD_STATIC_LIBS )
if ( NOT WIN32 )
if ( NOT NO_LIBM )
list ( APPEND LAGRAPH_STATIC_LIBS "m" )
endif ( )
endif ( )
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Jan 10, 2024: version 1.1.1

* minor update to build system

Dec 30, 2023: version 1.1.0

* major change to build system: by Markus Mützel
Expand Down
13 changes: 13 additions & 0 deletions cmake_modules/SuiteSparsePolicy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,19 @@ message ( STATUS "Build type: ${CMAKE_BUILD_TYPE} ")

set ( CMAKE_INCLUDE_CURRENT_DIR ON )

#-------------------------------------------------------------------------------
# Workaround for math.h on old macOS
#-------------------------------------------------------------------------------

if ( APPLE AND CMAKE_SYSTEM_VERSION VERSION_LESS 11 )
# Older versions of math.h on the Mac define Real and Imag, which
# conflict with the internal use of those symbols in CHOLMOD, KLU, SPQR,
# UMFPACK, and ParU.
# This can be disabled with -D__NOEXTENSIONS__
message ( STATUS "MacOS: disable extensions in math.h" )
add_compile_definitions ( "__NOEXTENSIONS__" )
endif ( )

#-------------------------------------------------------------------------------
# check if Fortran is available and enabled
#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/LAGraphConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ endif ( )

# Look for OpenMP
if ( @LAGRAPH_HAS_OPENMP@ AND NOT OpenMP_C_FOUND )
find_dependency ( OpenMP )
find_dependency ( OpenMP COMPONENTS C )
if ( NOT OpenMP_C_FOUND )
set ( _dependencies_found OFF )
endif ( )
Expand Down
4 changes: 2 additions & 2 deletions include/LAGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
// See also the LAGraph_Version utility method, which returns these values.
// These definitions are derived from LAGraph/CMakeLists.txt.

#define LAGRAPH_DATE "Dec 30, 2023"
#define LAGRAPH_DATE "Jan 10, 2024"
#define LAGRAPH_VERSION_MAJOR 1
#define LAGRAPH_VERSION_MINOR 1
#define LAGRAPH_VERSION_UPDATE 0
#define LAGRAPH_VERSION_UPDATE 1

//==============================================================================
// include files and helper macros
Expand Down
15 changes: 7 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ include_directories ( utility )

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

if ( WIN32 )
set ( M_LIB "" )
else ( )
set ( M_LIB "m" )
endif ( )

#-------------------------------------------------------------------------------
# dynamic lagraph library properties
#-------------------------------------------------------------------------------
Expand All @@ -42,7 +36,10 @@ if ( BUILD_SHARED_LIBS )
set_target_properties ( LAGraph PROPERTIES EXPORT_NO_SYSTEM ON )
endif ( )

target_link_libraries ( LAGraph PRIVATE GraphBLAS::GraphBLAS ${M_LIB} )
target_link_libraries ( LAGraph PRIVATE GraphBLAS::GraphBLAS )
if ( NOT NO_LIBM )
target_link_libraries ( LAGraph PRIVATE "m" )
endif ( )

target_include_directories ( LAGraph PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand Down Expand Up @@ -80,7 +77,9 @@ if ( BUILD_STATIC_LIBS )
else ( )
target_link_libraries ( LAGraph_static PUBLIC GraphBLAS::GraphBLAS )
endif ( )
target_link_libraries ( LAGraph_static PUBLIC ${M_LIB} )
if ( NOT NO_LIBM )
target_link_libraries ( LAGraph_static PUBLIC "m" )
endif ( )

target_include_directories ( LAGraph_static PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand Down
2 changes: 1 addition & 1 deletion src/benchmark/tc_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main (int argc, char **argv)
// warmup for more accurate timing, and also print # of triangles
double ttot = LAGraph_WallClockTime ( ) ;
printf ("\nwarmup method: ") ;
int presort = LAGr_TriangleCount_AutoSort ; // = 0 (auto selection)
LAGr_TriangleCount_Presort presort = LAGr_TriangleCount_AutoSort ;
print_method (stdout, 6, presort) ;

// warmup method:
Expand Down
Loading