cmake/Help/prop_sf/SKIP_UNITY_BUILD_INCLUSION.rst

18 lines
700 B
ReStructuredText
Raw Normal View History

2020-02-01 23:06:01 +01:00
SKIP_UNITY_BUILD_INCLUSION
--------------------------
2021-09-14 00:13:48 +02:00
.. versionadded:: 3.16
2020-02-01 23:06:01 +01:00
Setting this property to true ensures the source file will be skipped by
unity builds when its associated target has its :prop_tgt:`UNITY_BUILD`
property set to true. The source file will instead be compiled on its own
in the same way as it would with unity builds disabled.
This property helps with "ODR (One definition rule)" problems where combining
a particular source file with others might lead to build errors or other
unintended side effects.
2024-02-02 17:42:32 +01:00
Note that sources which are scanned for C++ modules (see
:manual:`cmake-cxxmodules(7)`) are not eligible for unity build inclusion and
will automatically be excluded.