Skip to content

Commit

Permalink
Simplify genex expressions
Browse files Browse the repository at this point in the history
Simplifications:
- `COMPILE_LANGUAGE` accepts comma-separated list since 3.15

Change-Id: I4af316a463b5771bf5b37a6b4d77e41adba60977
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 51dc4cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit cedaf89)
  • Loading branch information
Cristian Le authored and Qt Cherry-pick Bot committed Feb 14, 2025
1 parent 9d1ce68 commit e9d144f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/QtInternalTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function(qt_internal_set_warnings_are_errors_flags target target_scope)
# Apparently qmake only adds -Werror to CXX and OBJCXX files, not C files. We have to do the
# same otherwise MinGW builds break when building 3rdparty\md4c\md4c.c (and probably on other
# platforms too).
set(cxx_only_genex "$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>")
set(cxx_only_genex "$<COMPILE_LANGUAGE:CXX,OBJCXX>")
set(final_condition_genex "$<AND:${warnings_are_errors_enabled_genex},${cxx_only_genex}>")
set(flags_generator_expression "$<${final_condition_genex}:${flags}>")

Expand Down
2 changes: 1 addition & 1 deletion cmake/QtPrecompiledHeadersHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

function(qt_update_precompiled_header target precompiled_header)
if (precompiled_header AND BUILD_WITH_PCH)
set_property(TARGET "${target}" APPEND PROPERTY "PRECOMPILE_HEADERS" "$<$<OR:$<COMPILE_LANGUAGE:CXX>,$<COMPILE_LANGUAGE:OBJCXX>>:${precompiled_header}>")
set_property(TARGET "${target}" APPEND PROPERTY "PRECOMPILE_HEADERS" "$<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${precompiled_header}>")
endif()
endfunction()

Expand Down

0 comments on commit e9d144f

Please sign in to comment.