summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierreEVEN <[email protected]>2025-05-14 12:47:49 +0200
committerPierreEVEN <[email protected]>2025-05-14 12:47:49 +0200
commit5f31195278a7b04ce9e2f73cddc0daba91c0051b (patch)
treebf3c40339458e641211e5f3767b12e951f399c24
parent65438797e22062ff4f5089693f725c1cf3b1ceaa (diff)
renamed CMAKE_COMPILER_ID property to XMAKE_GLOBAL_COMPILER_ID to avoid potential conflicts
-rw-r--r--xmake/plugins/project/cmake/cmakelists.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua
index 1dc2d0223..8804e190a 100644
--- a/xmake/plugins/project/cmake/cmakelists.lua
+++ b/xmake/plugins/project/cmake/cmakelists.lua
@@ -817,7 +817,7 @@ function _add_target_values(cmakelists, target, name)
if name:endswith("s") then
name = name:sub(1, #name - 1)
end
- cmakelists:print("if(CMAKE_COMPILER_ID STREQUAL \"MSVC\")")
+ cmakelists:print("if(XMAKE_GLOBAL_COMPILER_ID STREQUAL \"MSVC\")")
local flags_cl = _map_compflags("cl", "c", name, values)
for _, flag in ipairs(flags_cl) do
cmakelists:print(" target_compile_options(%s PRIVATE %s)", target:name(), flag)