diff options
| author | ruki <[email protected]> | 2025-02-08 00:46:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-02-08 00:46:20 +0800 |
| commit | 4ebeeb443c1b270550334c796ed4cde48640e406 (patch) | |
| tree | 0315301ba57695b5728dd82c1e98feaf175a0718 /xmake/modules/package/tools/cmake.lua | |
| parent | 8931fa518f405d8682f19c5997313e00986d88a5 (diff) | |
improve tools.cmake
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 6faac6702..2599de853 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -1095,7 +1095,7 @@ function _build_for_cmakebuild(package, configs, opt) table.insert(argv, "--target") if #targets > 1 then -- https://stackoverflow.com/questions/47553569/how-can-i-build-multiple-targets-using-cmake-build - if _get_cmake_version():ge("3.15") then + if _get_cmake_version() and _get_cmake_version():ge("3.15") then table.join2(argv, targets) else raise("Build multiple targets need cmake >=3.15") @@ -1244,7 +1244,7 @@ function _shrink_cmake_arguments(argv, oldir, opt) local shrink = false local add_compile_options = false local add_link_options = false - if _get_cmake_version():ge("3.13") then + if _get_cmake_version() and _get_cmake_version():ge("3.13") then add_compile_options = true add_link_options = true end |
