summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-25 22:56:02 +0800
committerruki <[email protected]>2022-03-25 22:56:02 +0800
commitd5fa1e2e2efaef66bd34ff071e9b9f5c89d41045 (patch)
tree7cc1161f7f451a563ad1740291bf9f1bdd33c1f9
parent90dfe36c7560d7d8afbeeaa795932ed8f618f991 (diff)
fix tools.cmake
-rw-r--r--xmake/modules/package/tools/cmake.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua
index f77fb0d48..2b2fcb975 100644
--- a/xmake/modules/package/tools/cmake.lua
+++ b/xmake/modules/package/tools/cmake.lua
@@ -410,7 +410,7 @@ function _get_configs_for_cross(package, configs, opt)
name = name:gsub("clang%-", "clang++-")
name = name:gsub("gcc$", "g++")
name = name:gsub("gcc%-", "g++-")
- envs.CMAKE_CXX_COMPILER = dir and path.join(dir, name) or name
+ envs.CMAKE_CXX_COMPILER = _translate_bin_path(dir and path.join(dir, name) or name)
end
-- @note The link command line is set in Modules/CMake{C,CXX,Fortran}Information.cmake and defaults to using the compiler, not CMAKE_LINKER,
-- so we need set CMAKE_CXX_LINK_EXECUTABLE to use CMAKE_LINKER as linker.