Add an option to output a depfile for outside build-systems to learn the source file dependencies of the bindings. This can be used by 3rd party build system integrations to only rerun bindgen when necessary. Testing is done via CMake integration tests, since CMake is a 3rd party buildsystem which supports depfiles.
13 lines
275 B
CMake
13 lines
275 B
CMake
cmake_minimum_required(VERSION 3.21.0)
|
|
|
|
project(depfile_test
|
|
LANGUAGES C
|
|
DESCRIPTION "A CMake Project to test the --depfile output from cbindgen"
|
|
)
|
|
|
|
include(../cbindgen_test.cmake)
|
|
|
|
add_cbindgen_command(gen_bindings
|
|
"${CMAKE_CURRENT_BINARY_DIR}/single_crate.h"
|
|
)
|