|
From: <kin...@us...> - 2025-09-10 00:11:39
|
Revision: 7381
http://sourceforge.net/p/teem/code/7381
Author: kindlmann
Date: 2025-09-10 00:11:36 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
using new CheckLibM, but still in progress
Modified Paths:
--------------
teem/trunk/CMakeLists-v2.txt
Modified: teem/trunk/CMakeLists-v2.txt
===================================================================
--- teem/trunk/CMakeLists-v2.txt 2025-09-10 00:09:09 UTC (rev 7380)
+++ teem/trunk/CMakeLists-v2.txt 2025-09-10 00:11:36 UTC (rev 7381)
@@ -19,7 +19,7 @@
# along with this library; if not, see <https://www.gnu.org/licenses/>.
#
-# Teem/CMakeLists.txt Version 10.94
+# Teem/CMakeLists.txt Version 10.95
# This CMakeLists.txt describes a Teem package that contains:
# (1) a library ("libteem" on unix) and
@@ -78,7 +78,7 @@
include(CMakeParseArguments) # for cmake_parse_arguments
include(CMakePrintHelpers) # for debugging via cmake_print_variables(varname)
-# CMake modules path (for e.g. FindLEVMAR.cmake)
+# CMake modules path (for e.g. CheckLibM.cmake)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
###-------------------------------------------------------------------------------------
@@ -375,9 +375,13 @@
# (used as part of handling Windows "extern" analog)
target_compile_definitions(Teem PUBLIC "$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:TEEM_STATIC>")
-# brute-force: add -lm to link line for any and all Unices:
-if(UNIX)
+# Do we need to link with -lm?
+include(CheckLibM)
+if(LIBM_NEEDED)
+ message(STATUS "Will explicitly link with -lm")
target_link_libraries(Teem PRIVATE m)
+else()
+ message(STATUS "Do not need to link with -lm")
endif()
# Set remaining target properties
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|