Skip to content
Snippets Groups Projects
Commit c533975d authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix autogeneration of module.h

Now module.h is autogenerated automatically on `make all`
if one or more source header files have changed.

Closes #2481
parent e88073ac
No related branches found
No related tags found
No related merge requests found
......@@ -31,12 +31,14 @@ function(rebuild_module_api)
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/module_footer.h >> ${tmpfile}
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${tmpfile} ${dstfile}
COMMAND ${CMAKE_COMMAND} -E remove ${errcodefile} ${tmpfile}
DEPENDS ${srcfiles} ${CMAKE_SOURCE_DIR}/src/box/errcode.h
DEPENDS ${CMAKE_SOURCE_DIR}/extra/apigen
${CMAKE_CURRENT_SOURCE_DIR}/module_header.h
${CMAKE_CURRENT_SOURCE_DIR}/module_footer.h
${CMAKE_SOURCE_DIR}/src/box/errcode.h
${headers}
)
add_custom_target(api ALL DEPENDS ${srcfiles} ${dstfile})
add_custom_target(api ALL DEPENDS ${dstfile})
install(FILES ${dstfile} DESTINATION ${MODULE_INCLUDEDIR})
endfunction()
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/module.h" PROPERTIES GENERATED HEADER_FILE_ONLY)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment