Skip to content

Commit

Permalink
configuration hooks to enable gen-zam to take multiple arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
vpax committed May 2, 2024
1 parent 1d79336 commit 3488019
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Gen-ZAM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# GEN_ZAM_OUTPUT_H.
#
# The macro also creates a target that can be used to define depencencies on the
# generated files. The name of the target includes the input template filename
# generated files. The name of the target includes the input template directory
# to make it unique, and is added automatically to bro_ALL_GENERATED_OUTPUTS.
macro (gen_zam_target gzInput)
get_filename_component(gzInputBasename "${gzInput}" NAME)
macro (gen_zam_target gzInputDir)
get_filename_component(gzInputBasename "${gzInputDir}" NAME)

set(target "gen-zam-${gzInputBasename}")
string(REGEX REPLACE "/" "-" target "${target}")
Expand Down Expand Up @@ -41,8 +41,8 @@ macro (gen_zam_target gzInput)

add_custom_command(
OUTPUT ${GEN_ZAM_OUTPUT_H}
COMMAND ${GEN_ZAM_EXE} ARGS ${gzInput}
DEPENDS ${gzInput} ${GEN_ZAM_EXE}
COMMAND ${GEN_ZAM_EXE} ARGS ${GEN_ZAM_SRC}
DEPENDS ${GEN_ZAM_SRC} ${GEN_ZAM_EXE}
COMMENT "[gen-zam] Generating ZAM operations"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

Expand Down

0 comments on commit 3488019

Please sign in to comment.