diff options
| author | Morgan Caron <[email protected]> | 2022-08-20 17:34:54 +0200 |
|---|---|---|
| committer | Morgan Caron <[email protected]> | 2022-08-20 19:21:57 +0200 |
| commit | 278f37f3aa0c45c669dc96d10053bc855e1febdc (patch) | |
| tree | 628384eb1a153bd967e9ca83b394185b13ff8bc0 | |
| parent | db90d109c6ccf2545e8a3ae186ddfea1c99be61f (diff) | |
Adding C++2b support
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/core/tools/clang_cl.lua | 7 | ||||
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 11 | ||||
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 2 | ||||
| -rw-r--r-- | xmake/plugins/project/vsxmake/vsproj/Xmake.props | 4 |
5 files changed, 20 insertions, 7 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 8d90e47a4..506f9e6d7 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -229,6 +229,8 @@ function nf_language(self, stdname) , gnuxx2a = {"-std:c++20", "-std:c++latest"} , cxx23 = {"-std:c++23", "-std:c++latest"} , gnuxx23 = {"-std:c++23", "-std:c++latest"} + , cxx2b = {"-std:c++23", "-std:c++latest"} + , gnuxx2b = {"-std:c++23", "-std:c++latest"} , cxxlatest = "-std:c++latest" , gnuxxlatest = "-std:c++latest" } @@ -664,4 +666,3 @@ function compile(self, sourcefile, objectfile, dependinfo, flags, opt) end end end - diff --git a/xmake/modules/core/tools/clang_cl.lua b/xmake/modules/core/tools/clang_cl.lua index be4f6d947..45a4037b4 100644 --- a/xmake/modules/core/tools/clang_cl.lua +++ b/xmake/modules/core/tools/clang_cl.lua @@ -51,14 +51,20 @@ function init(self) , ["-std=c++17"] = "-Xclang -std=c++17" , ["-std=c++1z"] = "-Xclang -std=c++1z" , ["-std=c++1a"] = "-Xclang -std=c++1a" + , ["-std=c++20"] = "-Xclang -std=c++20" , ["-std=c++2a"] = "-Xclang -std=c++2a" + , ["-std=c++23"] = "-Xclang -std=c++23" + , ["-std=c++2b"] = "-Xclang -std=c++2b" , ["-std=gnu++98"] = "-Xclang -std=gnu++98" , ["-std=gnu++11"] = "-Xclang -std=gnu++11" , ["-std=gnu++14"] = "-Xclang -std=gnu++14" , ["-std=gnu++17"] = "-Xclang -std=gnu++17" , ["-std=gnu++1z"] = "-Xclang -std=gnu++1z" , ["-std=gnu++1a"] = "-Xclang -std=gnu++1a" + , ["-std=gnu++20"] = "-Xclang -std=gnu++20" , ["-std=gnu++2a"] = "-Xclang -std=gnu++2a" + , ["-std=gnu++23"] = "-Xclang -std=gnu++23" + , ["-std=gnu++2b"] = "-Xclang -std=gnu++2b" }) end @@ -178,4 +184,3 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) dependinfo.depfiles_cl = outdata end end - diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index 3906e5c48..4122c8ae8 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -209,10 +209,12 @@ function nf_language(self, stdname) , gnuxx20 = {"-std=gnu++20", "-std=c++2a"} , cxx2a = "-std=c++2a" , gnuxx2a = "-std=gnu++2a" - , cxx23 = "-std=c++23" - , gnuxx23 = "-std=gnu++23" - , cxxlatest = {"-std=c++23", "-std=c++20", "-std=c++2a", "-std=c++17", "-std=c++14", "-std=c++11", "-std=c++1z", "-std=c++98"} - , gnuxxlatest = {"-std=gnu++23", "-std=gnu++20", "-std=gnu++2a", "-std=gnu++17", "-std=gnu++14", "-std=gnu++11", "-std=c++1z", "-std=gnu++98"} + , cxx23 = {"-std=c++23", "-std=c++2b"} + , gnuxx23 = {"-std=gnu++23", "-std=c++2b"} + , cxx2b = "-std=c++2b" + , gnuxx2b = "-std=gnu++2b" + , cxxlatest = {"-std=c++23", "-std=c++2b", "-std=c++20", "-std=c++2a", "-std=c++17", "-std=c++14", "-std=c++11", "-std=c++1z", "-std=c++98"} + , gnuxxlatest = {"-std=gnu++23", "-std=gnu++2b", "-std=gnu++20", "-std=gnu++2a", "-std=gnu++17", "-std=gnu++14", "-std=gnu++11", "-std=c++1z", "-std=gnu++98"} } local cxxmaps2 = {} for k, v in pairs(_g.cxxmaps) do @@ -704,4 +706,3 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) } } end - diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index f9842bff1..24b680b0d 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -863,6 +863,8 @@ function _make_common_item(vcxprojfile, vsinfo, target, targetinfo) cxx1z = "stdcpp17", cxx20 = "stdcpp20", cxx2a = "stdcpplatest", + cxx23 = "stdcpplatest", + cxx2b = "stdcpplatest", cxxlatest = "stdcpplatest", gnuxx11 = "stdcpp11", gnuxx14 = "stdcpp14", diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.props b/xmake/plugins/project/vsxmake/vsproj/Xmake.props index 9fa9f7ea1..6b2e9da34 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.props +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.props @@ -106,6 +106,8 @@ <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('cxx1z'))">stdcpp17</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('cxx20'))">stdcpplatest</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('cxx2a'))">stdcpplatest</LanguageStandard> + <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('cxx23'))">stdcpplatest</LanguageStandard> + <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('cxx2b'))">stdcpplatest</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('cxxlatest'))">stdcpplatest</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx11'))">stdcpp11</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx14'))">stdcpp14</LanguageStandard> @@ -113,6 +115,8 @@ <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx1z'))">stdcpp17</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx20'))">stdcpplatest</LanguageStandard> <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx2a'))">stdcpplatest</LanguageStandard> + <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx23'))">stdcpplatest</LanguageStandard> + <LanguageStandard Condition="'%(LanguageStandard)' == '' And $(XmakeLanguages.Contains('gnuxx2b'))">stdcpplatest</LanguageStandard> <PrecompiledHeader Condition="'%(PrecompiledHeader)' == '' And $(XmakePrecompiledHeader.Contains('.h'))">Use</PrecompiledHeader> <PrecompiledHeaderFile Condition="'%(PrecompiledHeaderFile)' == '' And $(XmakePrecompiledHeader.Contains('.h'))">$(XmakeProjectDir)\$(XmakePrecompiledHeader)</PrecompiledHeaderFile> <ForcedIncludeFiles Condition="'%(ForcedIncludeFiles)' == '' And $(XmakePrecompiledHeader.Contains('.h'))">$(XmakeProjectDir)\$(XmakePrecompiledHeader);%(ForcedIncludeFiles)</ForcedIncludeFiles> |
