Skip to content

Commit

Permalink
LAGraph 1.1.2: minor updates to build system
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Jan 24, 2024
1 parent 1614afc commit 1beaf9d
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 15 deletions.
9 changes: 3 additions & 6 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 "Jan 10, 2024" )
set ( LAGraph_DATE "Jan 20, 2024" )
set ( LAGraph_VERSION_MAJOR 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_MINOR 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_SUB 1 CACHE STRING "" FORCE )
set ( LAGraph_VERSION_SUB 2 CACHE STRING "" FORCE )

message ( STATUS "Building LAGraph version: v"
${LAGraph_VERSION_MAJOR}.
Expand Down Expand Up @@ -162,9 +162,6 @@ endif ( )
#-------------------------------------------------------------------------------

option ( LAGRAPH_USE_OPENMP "ON: Use OpenMP in LAGraph if available. OFF: Do not use OpenMP. (Default: SUITESPARSE_USE_OPENMP)" ${SUITESPARSE_USE_OPENMP} )
if ( NOT SUITESPARSE_USE_OPENMP )
set ( LAGRAPH_USE_OPENMP "OFF" CACHE STRING "" FORCE )
endif ( )
if ( COVERAGE )
set ( LAGRAPH_USE_OPENMP "OFF" CACHE STRING "" FORCE ) # OK: test coverage is enabled
message ( STATUS "OpenMP disabled for test coverage" )
Expand All @@ -184,7 +181,7 @@ else ( )
endif ( )
endif ( )

if ( OpenMP_C_FOUND )
if ( LAGRAPH_USE_OPENMP AND OpenMP_C_FOUND )
set ( LAGRAPH_HAS_OPENMP ON )
else ( )
set ( LAGRAPH_HAS_OPENMP OFF )
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Jan 20, 2024: version 1.1.2

* minor update to build system

Jan 10, 2024: version 1.1.1

* minor update to build system
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ remake:

# just run cmake to set things up
setup:
( cd build ; cmake $(CMAKE_OPTIONS) .. )
( cd build && cmake $(CMAKE_OPTIONS) .. )

install:
( cd build ; cmake --install . )
( cd build && cmake --install . )

# remove any installed libraries and #include files
uninstall:
Expand Down
12 changes: 11 additions & 1 deletion cmake_modules/SuiteSparsePolicy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.18.0" )
cmake_policy ( SET CMP0104 NEW ) # initialize CUDA architectures
endif ( )

# SuiteSparse packages have many intentional extra semicolons, for code
# readability (such as "/* do nothing */ ;" in SuiteSparse_config.c). Disable
# the clang warning for these statements:
if ( CMAKE_C_COMPILER_ID STREQUAL "Clang" )
set ( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wno-extra-semi-stmt" )
endif ( )
if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
set ( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wno-extra-semi-stmt" )
endif ( )

if ( WIN32 )
set ( CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS true )
add_compile_definitions ( _CRT_SECURE_NO_WARNINGS )
Expand All @@ -120,7 +130,7 @@ set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake_modules )

# Use OpenMP
option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP if available. OFF: Do not use OpenMP" ON )
option ( SUITESPARSE_USE_OPENMP "ON (default): Use OpenMP in libraries by default if available. OFF: Do not use OpenMP by default." ON )

# strict usage
option ( SUITESPARSE_USE_STRICT "ON: treat all _USE__ settings as strict if they are ON. OFF (default): consider *_USE_* as preferences, not strict" OFF )
Expand Down
2 changes: 1 addition & 1 deletion experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ endif ( )
# add OpenMP
#-------------------------------------------------------------------------------

if ( OpenMP_C_FOUND )
if ( LAGRAPH_HAS_OPENMP )
if ( BUILD_SHARED_LIBS )
target_link_libraries ( LAGraphX PRIVATE OpenMP::OpenMP_C )
endif ( )
Expand Down
2 changes: 1 addition & 1 deletion experimental/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ endif ( )
# add OpenMP
#-------------------------------------------------------------------------------

if ( OpenMP_C_FOUND )
if ( LAGRAPH_HAS_OPENMP )
if ( BUILD_SHARED_LIBS )
target_link_libraries ( lagraphxtest PRIVATE OpenMP::OpenMP_C )
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 "Jan 10, 2024"
#define LAGRAPH_DATE "Jan 20, 2024"
#define LAGRAPH_VERSION_MAJOR 1
#define LAGRAPH_VERSION_MINOR 1
#define LAGRAPH_VERSION_UPDATE 1
#define LAGRAPH_VERSION_UPDATE 2

//==============================================================================
// include files and helper macros
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ endif ( )
# add OpenMP
#-------------------------------------------------------------------------------

if ( OpenMP_C_FOUND )
if ( LAGRAPH_HAS_OPENMP )
if ( BUILD_SHARED_LIBS )
target_link_libraries ( LAGraph PRIVATE OpenMP::OpenMP_C )
endif ( )
Expand Down
2 changes: 1 addition & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ endif ( )
# add OpenMP
#-------------------------------------------------------------------------------

if ( OpenMP_C_FOUND )
if ( LAGRAPH_HAS_OPENMP )
if ( BUILD_SHARED_LIBS )
target_link_libraries ( lagraphtest PRIVATE OpenMP::OpenMP_C )
endif ( )
Expand Down

0 comments on commit 1beaf9d

Please sign in to comment.