diff options
| author | OpportunityLiu <[email protected]> | 2019-06-03 15:24:52 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-03 15:24:52 +0800 |
| commit | 9c7bcd8a7f9578101e71f25479daf9b5879d5b0b (patch) | |
| tree | 3ace0e826a529d1a6c02428fb7d5f26a878b2416 | |
| parent | 448ec7e23eb0beaf4bd1d395656ae55b1f06c5f8 (diff) | |
code style
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/private/tools/gcc/parse_deps.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/private/tools/nvcc/parse_deps.lua | 21 |
3 files changed, 26 insertions, 5 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index cc9a14f42..066e86cc9 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -24,7 +24,7 @@ import("core.project.config") import("core.project.project") import("core.language.language") import("detect.tools.find_ccache") -import("private.tools.gcc.parse_deps") +import("private.tools.nvcc.parse_deps") -- init it function init(self) diff --git a/xmake/modules/private/tools/gcc/parse_deps.lua b/xmake/modules/private/tools/gcc/parse_deps.lua index ec740f220..04e97b17b 100644 --- a/xmake/modules/private/tools/gcc/parse_deps.lua +++ b/xmake/modules/private/tools/gcc/parse_deps.lua @@ -15,14 +15,14 @@ -- Copyright (C) 2015 - 2019, TBOOX Open Source Group. -- -- @author ruki --- @file gcc.lua +-- @file parse_deps.lua -- -- imports import("core.project.project") -- a placeholder for spaces in path -local spacePlaceHolder = "\001*\002" +local space_placeholder = "\001*\002" -- normailize path of a dependecy function _normailize_dep(dep) @@ -65,9 +65,9 @@ function main(depsdata) local p = line:find(':', 1, true) if p ~= nil then line = line:sub(p + 1) - line = line:gsub("\\ ", spacePlaceHolder) + line = line:gsub("\\ ", space_placeholder) for _, includefile in ipairs(line:split("%s")) do - includefile = includefile:gsub(spacePlaceHolder, " ") + includefile = includefile:gsub(space_placeholder, " ") includefile = _normailize_dep(includefile) if includefile then table.insert(results, includefile) diff --git a/xmake/modules/private/tools/nvcc/parse_deps.lua b/xmake/modules/private/tools/nvcc/parse_deps.lua new file mode 100644 index 000000000..0f9c2504c --- /dev/null +++ b/xmake/modules/private/tools/nvcc/parse_deps.lua @@ -0,0 +1,21 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015 - 2019, TBOOX Open Source Group. +-- +-- @author OpportunityLiu +-- @file parse_deps.lua +-- + +inherit("private.tools.gcc.parse_deps")
\ No newline at end of file |
