Skip to content

Commit

Permalink
wasm: Add warning and error when using not recommended emscripten
Browse files Browse the repository at this point in the history
This will produce an error when configuring Qt with Emscripten
version less than what is recommended version.
It will produce only a warning when configuring using
Emscripten version greater than recommended.

Change-Id: I62016394e8e52657a5e1d78c4288866e83af2d28
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
  • Loading branch information
Lorn Potter committed Nov 25, 2024
1 parent fedf761 commit fd61822
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1460,9 +1460,15 @@ qt_configure_add_report_entry(
CONDITION QT_FEATURE_thread AND WASM
)
qt_configure_add_report_entry(
TYPE WARNING
TYPE ERROR
MESSAGE "You should use the recommended Emscripten version ${QT_EMCC_RECOMMENDED_VERSION} with this Qt. You have ${EMCC_VERSION}."
CONDITION WASM AND NOT ${EMCC_VERSION} MATCHES ${QT_EMCC_RECOMMENDED_VERSION}
CONDITION WASM AND ${EMCC_VERSION} VERSION_LESS ${QT_EMCC_RECOMMENDED_VERSION}
)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "Using Emscripten version ${QT_EMCC_RECOMMENDED_VERSION} with this Qt
may have issues. You have ${EMCC_VERSION}."
CONDITION WASM AND ${EMCC_VERSION} VERSION_GREATER ${QT_EMCC_RECOMMENDED_VERSION}
)
qt_configure_add_report_entry(
TYPE WARNING
Expand Down

0 comments on commit fd61822

Please sign in to comment.