Skip to content

Commit 24ca1ce

Browse files
authored
Merge pull request #6236 from Doekin/dev
package(cmake): fix incorrect flag handling caused by substring matching
2 parents 8ed7230 + 2190152 commit 24ca1ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xmake/modules/package/tools/cmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ function _insert_configs_from_envs(configs, envs, opt)
390390
opt = opt or {}
391391
local configs_str = opt._configs_str
392392
for k, v in pairs(envs) do
393-
if configs_str and configs_str:find(k, 1, true) then
393+
if configs_str and configs_str:find("-D" .. k .. "=", 1, true) then
394394
-- use user custom configuration
395395
else
396396
table.insert(configs, "-D" .. k .. "=" .. v)

0 commit comments

Comments
 (0)