summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeanSquaredError <[email protected]>2025-11-19 16:49:36 +0200
committerMeanSquaredError <[email protected]>2025-11-19 16:49:36 +0200
commitf721a9973be5e1c96a3130bda8c19179b87635a0 (patch)
treeb10906c04aca04655180109baa4f13f644bb458a
parent660450b6adb49c5a8b792a0c844a414d0a1b7379 (diff)
cmake find_package: When printing debug output use io.write() instead of cprint() because the latter does unwanted ${var} expansion.
-rw-r--r--xmake/modules/package/manager/cmake/find_package.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua
index 96aa85f31..f1b4cd321 100644
--- a/xmake/modules/package/manager/cmake/find_package.lua
+++ b/xmake/modules/package/manager/cmake/find_package.lua
@@ -131,7 +131,8 @@ function _find_package(cmake, name, opt)
cmakefile:close()
if option.get("diagnosis") then
local cmakedata = io.readfile(filepath)
- cprint("finding it from the generated CMakeLists.txt:\n${dim}%s", cmakedata)
+ cprint("finding it from the generated CMakeLists.txt:")
+ io.write(cmakedata .. "\n")
end
-- run cmake
@@ -151,7 +152,8 @@ function _find_package(cmake, name, opt)
local flagsdata = io.readfile(flagsfile)
if flagsdata then
if option.get("diagnosis") then
- cprint("finding includes from %s\n${dim}%s", flagsfile, flagsdata)
+ cprint("finding includes from %s", flagsfile)
+ io.write(flagsdata .. "\n")
end
for _, line in ipairs(flagsdata:split("\n", {plain = true})) do
if line:find("CXX_INCLUDES =", 1, true) then
@@ -191,7 +193,8 @@ function _find_package(cmake, name, opt)
local linkdata = io.readfile(linkfile)
if linkdata then
if option.get("diagnosis") then
- cprint("finding links from %s\n${dim}%s", linkfile, linkdata)
+ cprint("finding links from %s", linkfile)
+ io.write(linkdata .. "\n")
end
for _, line in ipairs(os.argv(linkdata)) do
local is_ldflags = false