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/package/tools/cmake.lua | |
| parent | ee98b61be7054e1b8b8e2668b67c662ba12e264b (diff) | |
keep package source
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 3 |
1 files changed, 3 insertions, 0 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" |
