diff options
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/manager/cmake/configurations.lua | 1 | ||||
| -rw-r--r-- | xmake/modules/package/manager/cmake/find_package.lua | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/xmake/modules/package/manager/cmake/configurations.lua b/xmake/modules/package/manager/cmake/configurations.lua index 626c973d0..3cc597a93 100644 --- a/xmake/modules/package/manager/cmake/configurations.lua +++ b/xmake/modules/package/manager/cmake/configurations.lua @@ -29,7 +29,6 @@ function main() moduledirs = {description = "Set the cmake modules directories."}, presets = {description = "Set the preset values, e.g. {Boost_USE_STATIC_LIB = true}"}, envs = {description = "Set the run environments of cmake, e.g. {CMAKE_PREFIX_PATH = \"xxx\"}"}, - debug = {description = "Set the CMAKE_BUILD_TYPE=Debug if set to ture."} } end diff --git a/xmake/modules/package/manager/cmake/find_package.lua b/xmake/modules/package/manager/cmake/find_package.lua index a25cd9e74..b548fc123 100644 --- a/xmake/modules/package/manager/cmake/find_package.lua +++ b/xmake/modules/package/manager/cmake/find_package.lua @@ -107,12 +107,9 @@ function _find_package(cmake, name, opt) -- run cmake local envs = configs.envs or opt.envs - if (configs.debug) then - if (not envs) then - envs = {CMAKE_BUILD_TYPE = "Debug"} - elseif (not envs.CMAKE_BUILD_TYPE) then - envs.CMAKE_BUILD_TYPE = "Debug" - end + if opt.mode == "debug" then + envs = envs or {} + envs.CMAKE_BUILD_TYPE = envs.CMAKE_BUILD_TYPE or "Debug" end try {function() return os.vrunv(cmake.program, {workdir}, {curdir = workdir, envs = envs}) end} |
