summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-07-21 22:31:37 +0800
committerruki <[email protected]>2025-07-21 22:31:37 +0800
commit6694d5b11dd4740d1ff8a401f43574e85efd2076 (patch)
tree52c5f8f05fa55293097d4dbfcda8485f93371401
parentee0c655c4d3706079f3286bacd2fe7519e59e038 (diff)
improve tools/cmake
-rw-r--r--xmake/modules/package/tools/cmake.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index 75912612a..90b2530ee 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -462,11 +462,11 @@ function _get_configs_for_windows(package, configs, opt)
if package:has_tool("cc", "clang", "clang_cl") then
envs.CMAKE_C_COMPILER = _translate_bin_path(package:build_getenv("cc"))
-- @see https://github.com/xmake-io/xmake-repo/issues/7662
- envs.CMAKE_C_FLAGS = table.join(package:build_getenv("cflags") or {}, package:build_getenv("cxflags"))
+ envs.CMAKE_C_FLAGS = _get_cflags(package, {cross = true})
end
if package:has_tool("cxx", "clang", "clang_cl") then
envs.CMAKE_CXX_COMPILER = _translate_bin_path(package:build_getenv("cxx"))
- envs.CMAKE_CXX_FLAGS = table.join(package:build_getenv("cxxflags") or {}, package:build_getenv("cxflags"))
+ envs.CMAKE_CXX_FLAGS = _get_cxxflags(package, {cross = true})
end
-- we maybe need patch `cmake_policy(SET CMP0091 NEW)` to enable this argument for some packages