CMake: Support the -c++std configure argument

Task-number: QTBUG-85373
Change-Id: I071c1d0c8bf96b34c5733d039b8a61e54e416800
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Joerg Bornemann 2020-07-06 09:53:44 +02:00
parent 23216a6193
commit 619ec7bc15

View File

@ -134,6 +134,10 @@ while(configure_args)
elseif(arg STREQUAL "-qtnamespace")
list(POP_FRONT configure_args namespace)
push("-DQT_NAMESPACE=${namespace}")
elseif(arg STREQUAL "-c++std")
list(POP_FRONT configure_args edition)
string(REGEX REPLACE "^c\\+\\+" "" edition "${edition}")
push("-DCMAKE_CXX_STANDARD=${edition}")
elseif(arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim.
push(${configure_args})