Add support for C++ language standard in QtCreator template

Resolve #3719
This commit is contained in:
valeros
2020-11-01 19:03:14 +02:00
parent 950a540df4
commit 0bec4e25c8

View File

@ -1,3 +1,13 @@
% import re
%
% cpp_standards_remap = {
% "0x": "11",
% "1y": "14",
% "1z": "17",
% "2a": "20",
% "2b": "23"
% }
win32 {
HOMEDIR += $$(USERPROFILE)
}
@ -27,3 +37,9 @@ HEADERS += {{file}}
SOURCES += {{file}}
% end
% end
% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)")
% cxx_stds = STD_RE.findall(cxx_flags)
% if cxx_stds:
CONFIG += c++{{ cpp_standards_remap.get(cxx_stds[-1], cxx_stds[-1]) }}
% end