diff options
| author | ruki <[email protected]> | 2019-03-13 23:21:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-03-13 14:09:08 +0800 |
| commit | 57506c7b8ba8941ebac3676a241f8444e0079a56 (patch) | |
| tree | d96c4a685b939831745e4b66edf4b3884aa8666e /xmake/modules | |
| parent | 8dfe470e645f24399234af603187dbd30c39b558 (diff) | |
fix defines for cuda
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 219619d6d..0c64e1b43 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -102,6 +102,26 @@ function nf_optimize(self, level) return maps[level] end +-- make the language flag +function nf_language(self, stdname) + + -- the stdc++ maps + if _g.cxxmaps == nil then + _g.cxxmaps = + { + cxx03 = "--std c++03" + , cxx11 = "--std c++11" + , cxx14 = "--std c++14" + } + local cxxmaps2 = {} + for k, v in pairs(_g.cxxmaps) do + cxxmaps2[k:gsub("xx", "++")] = v + end + table.join2(_g.cxxmaps, cxxmaps2) + end + return _g.cxxmaps[stdname] +end + -- make the define flag function nf_define(self, macro) return "-D" .. macro |
