diff options
| author | ruki <[email protected]> | 2026-02-10 23:48:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-02-10 23:48:02 +0800 |
| commit | 83f17e9557c971690a276ff93a5b65d66eba709d (patch) | |
| tree | 2fd238f7864ea17b733749564aae46cd078c1888 /xmake/modules | |
| parent | ee98b61be7054e1b8b8e2668b67c662ba12e264b (diff) | |
keep package source
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/download.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 7bf9b8b31..1557aebeb 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -426,6 +426,9 @@ function _get_configs_for_generic(package, configs, opt) if package:is_library() then envs.BUILD_SHARED_LIBS = package:config("shared") and "ON" or "OFF" end + if package:has_source() then + envs.CMAKE_EXPORT_COMPILE_COMMANDS = "ON" + end -- https://cmake.org/cmake/help/latest/variable/CMAKE_LINKER_TYPE.html if package:has_tool("ld", "link") then envs.CMAKE_LINKER_TYPE = "MSVC" diff --git a/xmake/modules/private/action/require/impl/actions/download.lua b/xmake/modules/private/action/require/impl/actions/download.lua index a247acfdc..84c8d85be 100644 --- a/xmake/modules/private/action/require/impl/actions/download.lua +++ b/xmake/modules/private/action/require/impl/actions/download.lua @@ -271,7 +271,7 @@ function _download(package, url, sourcedir, opt) os.mv(sourcedir_tmp, sourcedir) end -- mark this sourcedir as cleanable - if not package:is_debug() then + if not package:has_source() then package:data_set("cleanable_sourcedir", path.absolute(sourcedir)) end elseif extension and extension ~= "" then |
