PCRE2Project / pcre2

PCRE2 development is now based here.
Other
922 stars 194 forks source link

cmake: prevent multi library unity build conflicts #265

Closed carenas closed 1 year ago

carenas commented 1 year ago

When support for Unity/Jumbo builds was added[1], the fact that cmake will need to be able to not mix files with different PCRE2_UCHAR sizes was missed, resulting in a possibly broken build by redefining LINK_SIZE as shown by warnings during compilation.

Since 4678857 (add a C23 inspired checked integer multiplication helper (#198), 2023-02-03), the build will fail if the linker wouldn't be able to merge the multiple implementations of pcre2_ckd_smul from each participating library.

To avoid both problems, disable UNITY_BUILD for the non 8-bit libraries.

[1] https://github.com/PCRE2Project/pcre2/pull/94