diff options
| author | ruki <[email protected]> | 2022-08-20 00:52:01 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-20 00:52:01 +0800 |
| commit | 9accd1da89561c8695fec341a0c61768112953e5 (patch) | |
| tree | 63e658aea4b6108343d29dc29bd70a479c1f3f7d /xmake/plugins/project/cmake/cmakelists.lua | |
| parent | 7f9a70b2a26c715b4314069f4d80298c9b469a81 (diff) | |
improve cmakelists
Diffstat (limited to 'xmake/plugins/project/cmake/cmakelists.lua')
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 210c3205f..cb0a9482c 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -246,7 +246,11 @@ function _set_target_compiler(cmakelists, target) name = name:gsub("clang%-", "clang++-") name = name:gsub("gcc$", "g++") name = name:gsub("gcc%-", "g++-") - cxx = path.join(dir, name) + if dir ~= '.' then + cxx = path.join(dir, name) + else + cxx = name + end end cxx = cxx:gsub("\\", "/") cmakelists:print("set(CMAKE_CXX_COMPILER \"%s\")", cxx) |
