meekrosoft / fff

A testing micro framework for creating function test doubles
Other
768 stars 169 forks source link

Make fff installable #126

Open stephan-cr opened 1 year ago

stephan-cr commented 1 year ago

This commit make fff installable, via cmake --install <build-dir> --prefix <some-install-prefix> for example. During installation, imported targets are created, such that users are able to use fff like this:

find_package(fff REQUIRED)

add_executable(some_test some_test.ccp)
target_link_libraries(some_test PRIVATE fff::fff)

This won't affect users who embed fff in their source trees.

Furthermore, if FFF_GENERATE is enable, fff.h is generated into the build folder, instead of overwriting the pre-generated fff.h.

Thank you for your contribution.

Before submitting this PR, please make sure:

stephan-cr commented 1 year ago

Not sure if you like the approach, but let me know.