diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-15 15:42:50 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-15 13:50:25 +0000 |
commit | 4a7e7103e713448c05d9d30cab8b7e52406b46a6 (patch) | |
tree | ea613103a40d0aeb60b5026dd231cbb61f46b512 | |
parent | c13bafec0928b94e8e1ab8544efb6336bf4842c9 (diff) |
Fix precompile header usage
Latest CMake will try to compile the given precompiled headers
as C files, due to enabling the C language in the project + also
having c files.
Make sure to wrap the precompiled headers in a CXX language only
generator expression.
For details, see https://gitlab.kitware.com/cmake/cmake/issues/19839
Change-Id: Ib3508ad920092455c300b1a566ba6152bab032db
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | cmake/QtBuild.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 959a8872db..537979ad8a 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -953,7 +953,7 @@ endfunction() function(qt_update_precompiled_header target precompiled_header) if (precompiled_header AND BUILD_WITH_PCH) - set_property(TARGET "${target}" APPEND PROPERTY "PRECOMPILE_HEADERS" "${precompiled_header}") + set_property(TARGET "${target}" APPEND PROPERTY "PRECOMPILE_HEADERS" "$<$<COMPILE_LANGUAGE:CXX>:${precompiled_header}>") endif() endfunction() |