|
From: <kin...@us...> - 2025-09-12 05:02:14
|
Revision: 7412
http://sourceforge.net/p/teem/code/7412
Author: kindlmann
Date: 2025-09-12 05:02:12 +0000 (Fri, 12 Sep 2025)
Log Message:
-----------
more consistent use of [CheckLibM] self-identifiers
Modified Paths:
--------------
teem/trunk/CMake/CheckLibM.cmake
Modified: teem/trunk/CMake/CheckLibM.cmake
===================================================================
--- teem/trunk/CMake/CheckLibM.cmake 2025-09-12 03:54:18 UTC (rev 7411)
+++ teem/trunk/CMake/CheckLibM.cmake 2025-09-12 05:02:12 UTC (rev 7412)
@@ -39,8 +39,10 @@
set(_lib_type STATIC)
endif()
+set(_me "[CheckLibM]")
+
set(_lmn_desc "Need to add -lm when linking with math-using ${_lib_type} lib?")
-message(STATUS "CheckLibM: ${_lmn_desc}")
+message(STATUS "${_me} ${_lmn_desc}")
set(_checklibm_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/tmpCheckLibM")
file(MAKE_DIRECTORY "${_checklibm_dir}")
@@ -95,13 +97,13 @@
OUTPUT_VARIABLE _out)
if(NOT _ok)
- message(STATUS "CheckLibM: ${suffix} compilation failed:\n${_out}")
+ message(STATUS "${_me} ${suffix} compilation failed:\n${_out}")
set(${result_var} FALSE PARENT_SCOPE)
else()
# Run the resulting binary to check runtime
set(_bin "${_proj_dir}/build/maintiny${CMAKE_EXECUTABLE_SUFFIX}")
if(NOT EXISTS "${_bin}")
- message(FATAL_ERROR "CheckLibM: maintiny executable missing for ${suffix} test")
+ message(FATAL_ERROR "${_me} maintiny executable missing for ${suffix} test")
set(${result_var} FALSE PARENT_SCOPE)
else()
# Run the binary
@@ -114,7 +116,7 @@
set(${result_var} TRUE PARENT_SCOPE)
else()
message(FATAL_ERROR
- "CheckLibM: maintiny built in ${_suffix} mode but failed at runtime.\n"
+ "${_me} maintiny built in ${_suffix} mode but failed at runtime.\n"
"Exit code: ${_runres}\n"
"Stdout: ${_runout}\n"
"Stderr: ${_runerr}")
@@ -132,7 +134,7 @@
if(_checklibm_no_libm_ok)
# ... and either it did work without `-lm`, or ...
set(LIBM_NEEDED FALSE CACHE BOOL ${_lmn_desc})
- message(STATUS "CheckLibM: No, do NOT need -lm when linking with math-using ${_lib_type} lib")
+ message(STATUS "${_me} No, do NOT need -lm when linking with math-using ${_lib_type} lib")
else()
# ... it did not work without -lm.
# Does it does work *with* -lm?
@@ -141,11 +143,11 @@
if(_checklibm_with_libm_ok)
# Yes, it does work with -lm.
set(LIBM_NEEDED TRUE CACHE BOOL "${_lmn_desc}")
- message(STATUS "CheckLibM: yes, DO need -lm when linking with math-using ${_lib_type} lib")
+ message(STATUS "${_me} yes, DO need -lm when linking with math-using ${_lib_type} lib")
else()
# Yikes, it failed both without and with -lm. Bye.
message(FATAL_ERROR
- "CheckLibM: math test failed even with -lm. Output:\n"
+ "${_me} math test failed even with -lm. Output:\n"
"${_checklibm_no_libm_out}\n"
"${_checklibm_with_libm_out}")
endif()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|