summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-07-06 09:53:44 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-07-08 07:09:10 +0200
commit619ec7bc15a75d76182fb107e706ce882919e98a (patch)
tree6ed50beab69e64e4b69d6ec78e88f09e3d93d7a4 /cmake
parent23216a6193b649224aa533e40dd23d3646df71ae (diff)
CMake: Support the -c++std configure argument
Task-number: QTBUG-85373 Change-Id: I071c1d0c8bf96b34c5733d039b8a61e54e416800 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index bad7418779..63607ef72a 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -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})