diff --git a/modules/codelite/codelite_project.lua b/modules/codelite/codelite_project.lua index bf01b49f..11f35965 100755 --- a/modules/codelite/codelite_project.lua +++ b/modules/codelite/codelite_project.lua @@ -357,11 +357,11 @@ end function m.isCpp11(cfg) - return (cfg.cppdialect == 'gnu++11') or (cfg.cppdialect == 'C++11') + return (cfg.cppdialect == 'gnu++11') or (cfg.cppdialect == 'C++11') or (cfg.cppdialect == 'gnu++0x') or (cfg.cppdialect == 'C++0x') end function m.isCpp14(cfg) - return (cfg.cppdialect == 'gnu++14') or (cfg.cppdialect == 'C++14') + return (cfg.cppdialect == 'gnu++14') or (cfg.cppdialect == 'C++14') or (cfg.cppdialect == 'gnu++1y') or (cfg.cppdialect == 'C++1y') end function m.completion(cfg) diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 001e3da2..d914538e 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -766,12 +766,18 @@ allowed = { "Default", "C++98", + "C++0x", "C++11", + "C++1y", "C++14", + "C++1z", "C++17", "gnu++98", + "gnu++0x", "gnu++11", + "gnu++1y", "gnu++14", + "gnu++1z", "gnu++17", } } diff --git a/src/tools/gcc.lua b/src/tools/gcc.lua index 523d041f..f16e80ca 100644 --- a/src/tools/gcc.lua +++ b/src/tools/gcc.lua @@ -135,13 +135,19 @@ }, cppdialect = { ["C++98"] = "-std=c++98", + ["C++0x"] = "-std=c++0x", ["C++11"] = "-std=c++11", + ["C++1y"] = "-std=c++1y", ["C++14"] = "-std=c++14", - ["C++17"] = "-std=c++1z", + ["C++1z"] = "-std=c++1z", + ["C++17"] = "-std=c++17", ["gnu++98"] = "-std=gnu++98", + ["gnu++0x"] = "-std=gnu++0x", ["gnu++11"] = "-std=gnu++11", + ["gnu++1y"] = "-std=gnu++1y", ["gnu++14"] = "-std=gnu++14", - ["gnu++17"] = "-std=gnu++1z", + ["gnu++1z"] = "-std=gnu++1z", + ["gnu++17"] = "-std=gnu++17", }, rtti = { Off = "-fno-rtti" diff --git a/tests/tools/test_gcc.lua b/tests/tools/test_gcc.lua index 9cea6fa7..2667bb57 100644 --- a/tests/tools/test_gcc.lua +++ b/tests/tools/test_gcc.lua @@ -676,7 +676,7 @@ function suite.cxxflags_onCpp17() cppdialect "C++17" prepare() - test.contains({ "-std=c++1z" }, gcc.getcxxflags(cfg)) + test.contains({ "-std=c++17" }, gcc.getcxxflags(cfg)) test.contains({ }, gcc.getcflags(cfg)) end @@ -704,6 +704,6 @@ function suite.cxxflags_onCppGnu17() cppdialect "gnu++17" prepare() - test.contains({ "-std=gnu++1z" }, gcc.getcxxflags(cfg)) + test.contains({ "-std=gnu++17" }, gcc.getcxxflags(cfg)) test.contains({ }, gcc.getcflags(cfg)) end