forked from qt-creator/qt-creator
cmake: disable reuse pch files for static libs with MSVC
Was not able to build something against these libraries from another "cmake project". Change-Id: I3876d102a320b4f5324e25fd8e840c181010c2a7 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -291,6 +291,14 @@ function(enable_pch target)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# static libs are maybe used by other projects, so they can not reuse same pch files
|
||||
if (MSVC)
|
||||
get_target_property(target_type "${target}" TYPE)
|
||||
if (target_type MATCHES "STATIC")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Skip PCH for targets that do not have QT_NO_CAST_TO_ASCII
|
||||
get_target_property(target_defines "${target}" COMPILE_DEFINITIONS)
|
||||
if (NOT "QT_NO_CAST_TO_ASCII" IN_LIST target_defines)
|
||||
|
||||
Reference in New Issue
Block a user