summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/gcc
diff options
context:
space:
mode:
authorruki <[email protected]>2021-09-29 23:36:08 +0800
committerruki <[email protected]>2021-09-29 23:36:08 +0800
commitdb6fe6c5fafdac2e719fcfbfc9dbe305ed4cf606 (patch)
treeb852f84f50fbbf73481ec5f1d6c509f192c65901 /xmake/modules/detect/tools/gcc
parentd4397494c7585d62364df8026c1626f1f682baa5 (diff)
improve to detect c++ features
Diffstat (limited to 'xmake/modules/detect/tools/gcc')
-rw-r--r--xmake/modules/detect/tools/gcc/cxxfeatures.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/gcc/cxxfeatures.lua b/xmake/modules/detect/tools/gcc/cxxfeatures.lua
index e40eadf13..96eaecf66 100644
--- a/xmake/modules/detect/tools/gcc/cxxfeatures.lua
+++ b/xmake/modules/detect/tools/gcc/cxxfeatures.lua
@@ -35,8 +35,9 @@ end
function main()
-- init conditions
+ -- gcc -x c++ -std=c++20 -dM -E - < /dev/null | grep __cplusplus
local gcc_minver = "(__GNUC__ * 100 + __GNUC_MINOR__) >= 404"
- local gcc90_cxx20 = "(__GNUC__ * 100 + __GNUC_MINOR__) >= 900 && __cplusplus >= 201709L"
+ local gcc90_cxx20 = "(__GNUC__ * 100 + __GNUC_MINOR__) >= 900 && __cplusplus >= 202002L"
local gcc70_cxx17 = "(__GNUC__ * 100 + __GNUC_MINOR__) >= 700 && __cplusplus >= 201703L"
local gcc50_cxx14 = "(__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L"
local gcc49_cxx14 = "(__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L"