Skip to content

Commit

Permalink
cmake: do not duplicate libm
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Jul 14, 2024
1 parent cbeb5bb commit a5d2c70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# CMake support layer for SuiteSparse
#
# Copyright 2023 Sergiu Deitsch <[email protected]>
# Copyright 2024 Sergiu Deitsch <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
# limitations under the License.
#

cmake_minimum_required (VERSION 3.22)
cmake_minimum_required (VERSION 3.22...3.29)

if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set (CMAKE_CUDA_ARCHITECTURES 75)
Expand Down
14 changes: 7 additions & 7 deletions CXSparse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# CMake support layer for SuiteSparse
#
# Copyright 2016-2021 Sergiu Deitsch <[email protected]>
# Copyright 2024 Sergiu Deitsch <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
# limitations under the License.
#

cmake_minimum_required (VERSION 3.12)
cmake_minimum_required (VERSION 3.12..3.30)
project (cxsparse LANGUAGES C VERSION 3.2.0
DESCRIPTION "A Concise Sparse matrix package - Extended"
HOMEPAGE_URL http://faculty.cse.tamu.edu/davis/suitesparse.html
Expand Down Expand Up @@ -221,7 +221,7 @@ target_include_directories (cxsparse PUBLIC
)

if (HAVE_M)
target_link_libraries (cxsparse PRIVATE m)
target_link_libraries (cxsparse PUBLIC m)
endif (HAVE_M)

if (NOT HAVE_C99_COMPLEX STREQUAL "")
Expand Down Expand Up @@ -282,13 +282,13 @@ add_executable (cs_ci_demo2
$<TARGET_OBJECTS:cs_ci_demo_base>
Demo/cs_ci_demo2.c
)
target_link_libraries (cs_ci_demo2 PRIVATE cxsparse $<$<BOOL:${HAVE_M}>:m>)
target_link_libraries (cs_ci_demo2 PRIVATE cxsparse)

add_executable (cs_ci_demo3
$<TARGET_OBJECTS:cs_ci_demo_base>
Demo/cs_ci_demo3.c
)
target_link_libraries (cs_ci_demo3 PRIVATE cxsparse $<$<BOOL:${HAVE_M}>:m>)
target_link_libraries (cs_ci_demo3 PRIVATE cxsparse)

add_executable (cs_cl_demo1
Demo/cs_cl_demo1.c
Expand All @@ -306,13 +306,13 @@ add_executable (cs_cl_demo2
$<TARGET_OBJECTS:cs_cl_demo_base>
Demo/cs_cl_demo2.c
)
target_link_libraries (cs_cl_demo2 PRIVATE cxsparse $<$<BOOL:${HAVE_M}>:m>)
target_link_libraries (cs_cl_demo2 PRIVATE cxsparse)

add_executable (cs_cl_demo3
$<TARGET_OBJECTS:cs_cl_demo_base>
Demo/cs_cl_demo3.c
)
target_link_libraries (cs_cl_demo3 PRIVATE cxsparse $<$<BOOL:${HAVE_M}>:m>)
target_link_libraries (cs_cl_demo3 PRIVATE cxsparse)

add_executable (cs_di_demo1
Demo/cs_di_demo1.c
Expand Down

0 comments on commit a5d2c70

Please sign in to comment.