mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:07:35 +00:00
Meta: Allow specifying additional dependencies with invoke_generator
This commit is contained in:
parent
e73aeb4cea
commit
b5a876e606
1 changed files with 2 additions and 2 deletions
|
@ -178,7 +178,7 @@ function(remove_path_if_version_changed version version_file cache_path)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(invoke_generator name generator version_file header implementation)
|
function(invoke_generator name generator version_file header implementation)
|
||||||
cmake_parse_arguments(invoke_generator "" "" "arguments" ${ARGN})
|
cmake_parse_arguments(invoke_generator "" "" "arguments;dependencies" ${ARGN})
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${header}" "${implementation}"
|
OUTPUT "${header}" "${implementation}"
|
||||||
|
@ -187,7 +187,7 @@ function(invoke_generator name generator version_file header implementation)
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${implementation}.tmp" "${implementation}"
|
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${implementation}.tmp" "${implementation}"
|
||||||
COMMAND "${CMAKE_COMMAND}" -E remove "${header}.tmp" "${implementation}.tmp"
|
COMMAND "${CMAKE_COMMAND}" -E remove "${header}.tmp" "${implementation}.tmp"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
DEPENDS ${generator} "${version_file}"
|
DEPENDS ${generator} ${invoke_generator_dependencies} "${version_file}"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target("generate_${name}" DEPENDS "${header}" "${implementation}")
|
add_custom_target("generate_${name}" DEPENDS "${header}" "${implementation}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue