|
From: <kin...@us...> - 2025-09-10 00:24:04
|
Revision: 7382
http://sourceforge.net/p/teem/code/7382
Author: kindlmann
Date: 2025-09-10 00:24:03 +0000 (Wed, 10 Sep 2025)
Log Message:
-----------
tweaks, still in progress
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:11:36 UTC (rev 7381)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-10 00:24:03 UTC (rev 7382)
@@ -4,7 +4,7 @@
### Rationale
# Different unices have different ways of tacitly linking (or not) with -lm.
-# In the interests of pedantic explicitness, we figure out if, linking with -lm
+# In the interests of pedantic explicitness, we figure out if linking with -lm
# is needed when linking with a library that calls math functions. Yes,
# https://cmake.org/cmake/help/latest/module/CheckLibraryExists.html could
# probably do the job here, but once I (GLK) went down the rabbit hole of
@@ -48,7 +48,7 @@
file(WRITE "${_checklibm_dir}/tiny.c" "
#include <math.h>
int tinyFunc(double val) {
- return (7 != (int)(log1pf(tanf(val))));
+ return (6 != (int)(log1pf(tanf(val)))); // should be 7 not 6
}
")
@@ -93,7 +93,7 @@
ERROR_VARIABLE _${_suffix}_runerr
)
if(_${_suffix}_runres EQUAL 0)
- set(${_result_var} TRUE PARENT_SCOPE)
+ set(${_result_var} TRUE)
else()
message(FATAL_ERROR
"CheckLibM: maintiny built in ${_suffix} mode but failed at runtime.\n"
@@ -105,7 +105,7 @@
message(FATAL_ERROR "CheckLibM: maintiny executable missing in ${_suffix} test")
endif()
else()
- set(${_result_var} FALSE PARENT_SCOPE)
+ set(${_result_var} FALSE)
endif()
endmacro()
@@ -126,9 +126,9 @@
if(_checklibm_with_libm_ok)
# Yes, it does work with -lm.
set(LIBM_NEEDED TRUE CACHE BOOL "${_lmn_desc}")
- message(STATUS "CheckLibM: math requires explicit -lm")
+ message(STATUS "CheckLibM: yes, math requires explicit -lm")
else()
- # Yikes, it failed without and with -lm. Bye.
+ # Yikes, it failed both without and with -lm. Bye.
message(FATAL_ERROR
"CheckLibM: math test failed even with -lm. Output:\n"
"${_checklibm_no_libm_out}\n"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|