Skip to content

Commit

Permalink
Update cmake.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
c8ef authored Apr 29, 2024
1 parent d043d3d commit 237da5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xmake/modules/package/tools/cmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -400,13 +400,13 @@ function _get_configs_for_windows(package, configs, opt)
-- shrink PDB file
-- ref: https://devblogs.microsoft.com/cppblog/shrink-my-program-database-pdb-file/
if not opt._configs_str:find("CMAKE_EXE_LINKER_FLAGS") then
table.insert(configs, "-DCMAKE_EXE_LINKER_FLAGS=\"/opt:ref /opt:icf /pdbcompress\"")
table.insert(configs, "-DCMAKE_EXE_LINKER_FLAGS=/opt:ref /opt:icf /pdbcompress")
end
if not opt._configs_str:find("CMAKE_SHARED_LINKER_FLAGS") then
table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS=\"/opt:ref /opt:icf /pdbcompress\"")
table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS=/opt:ref /opt:icf /pdbcompress")
end
if not opt._configs_str:find("CMAKE_STATIC_LINKER_FLAGS") then
table.insert(configs, "-DCMAKE_STATIC_LINKER_FLAGS=\"/opt:ref /opt:icf /pdbcompress\"")
table.insert(configs, "-DCMAKE_STATIC_LINKER_FLAGS=/opt:ref /opt:icf /pdbcompress")
end

_get_configs_for_generic(package, configs, opt)
Expand Down

0 comments on commit 237da5d

Please sign in to comment.