When adding units to a CMake project using FetchContent, testing has to be explicitly disabled.
This check only enables testing, if units is the main project being built.
The ALIAS target makes sure, that units can be linked as units::units not only from the install tree, but from the build tree as well.
Both of these changes enable the cleaner usage of units with FetchContent.
When adding
units
to a CMake project using FetchContent, testing has to be explicitly disabled. This check only enables testing, ifunits
is the main project being built.The ALIAS target makes sure, that
units
can be linked asunits::units
not only from the install tree, but from the build tree as well.Both of these changes enable the cleaner usage of
units
with FetchContent.Before
After