Skip to content

Commit

Permalink
configure: accept -c++std c++17 again
Browse files Browse the repository at this point in the history
When 2cf66d4 removed support for
c++14, it incorrectly also removed support for explicitly setting the
default, C++17. This broke build scripts for no good reason, and made
it impossible to undo an earlier -c++std c++20 again.

Accept C++17 and C++1z again, as an explicit disabler for C++20 and
C++23 features.

Amends 2cf66d4.

Pick-to: 6.8
Fixes: QTBUG-125015
Change-Id: I99b80cd5f41fa5a23259630eae85ef807982f526
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
marcmutz committed Jun 12, 2024
1 parent 962539d commit 68e6406
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qt_cmdline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ function(qt_commandline_cxxstd arg val nextok)
qtConfAddError("Missing argument to command line parameter '${arg}'.")
return()
endif()
if(val MATCHES "(c\\+\\+)?(20|2a)")
if(val MATCHES "(c\\+\\+)?(17|1z)")
qtConfCommandlineDisableFeature(c++20)
qtConfCommandlineDisableFeature(c++2b)
elseif(val MATCHES "(c\\+\\+)?(20|2a)")
qtConfCommandlineEnableFeature(c++20)
qtConfCommandlineDisableFeature(c++2b)
elseif(val MATCHES "(c\\+\\+)?(2b)")
Expand Down

0 comments on commit 68e6406

Please sign in to comment.