You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UnitTest++ now correctly supports CMake's find_package config mode
[CMakeLists.txt]
- Bumped cmake minimum requirement to go to 3.0 as this
appears to be earliest version that transitive usage
requirements are supported.
- Added version to project so that is evident
when looking at CMakeLists.txt
- Removed include_directories as that command
affects more than just UnitTest++ in favor
of target_include_directories.
- The target_include_directories uses the
generator expressions to do the same thing
for the BUILD_INTERFACE condition but only
affects UnitTest++. The INSTALL_INTERFACE
ensures that when UnitTest++ is installed
client applications calling find_package
for UnitTest++ only have to add the
UnitTest++ target to the target_link_libraries
and will get the correct include path
for UnitTest++ added to their include paths.
- Added DEBUG_POSTFIX to both library and
unit test to distinguish them from each other
as they are installed into the same directory
and would otherwise overwrite one another.
- Added Versioning using write_basic_package_version_file
to the install so that a client can call
find_package(UnitTest++ 2.1 REQUIRED) and it will be
able to confirm the version. If the version is updated
you could theoretically ahve a version 2.2, 2.3 ,etc...
and the find_package mechanism will find the correct one.
the SameMajorVersion option in that call indicates
that 2.3 is compatible with 2.1 or in other words if
find_package(UnitTest++ 2.1 REQUIRED) is called and
2.3 is installed that satisfies the condition but
if only 3.0 was installed it will fail because of
'SameMajorVersion'.
- Also added installation for the Version file.
0 commit comments