Skip to content

Commit 356a9ce

Browse files
authored
Merge pull request #24 from Alan-Jowett/fix_cmake
Fix failure to generate symbols for BPF programs
2 parents 07efe43 + e6b2c09 commit 356a9ce

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

bpf/CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ function(convert_to_native file_name out_name option)
123123
POST_BUILD
124124
)
125125

126-
# Add a custom target that depends on the .sys file
127-
add_custom_target(${out_name}_SYS ALL DEPENDS ${bpf_sys_file_path} ${bpf_pdb_file_path} SOURCES ${bpf_obj_file_path})
128126

129127
# Copy the .sys file to the output directory as part of post build
130128
add_custom_command(
@@ -142,11 +140,10 @@ function(convert_to_native file_name out_name option)
142140
COMMENT "Copying BPF object ${bpf_pdb_file_path} to output directory"
143141
POST_BUILD)
144142

145-
# Add a custom target that depends on the .sys file
146-
add_custom_target(${bpf_sys_file_name}_out ALL DEPENDS ${bpf_sys_file_output_path} SOURCES ${bpf_sys_file_path})
143+
# Add a single custom target that depends on the .sys and .pdb file. This will ensure that the .sys and .pdb file
144+
# are generated and copied to the output directory.
145+
add_custom_target(${bpf_sys_file_name}_out ALL DEPENDS ${bpf_sys_file_output_path} ${bpf_pdb_file_output_path} SOURCES ${bpf_obj_file_path})
147146

148-
# Add a custom target that depends on the .pdb file
149-
add_custom_target(${bpf_pdb_file_name}_out ALL DEPENDS ${bpf_pdb_file_output_path} SOURCES ${bpf_pdb_file_path})
150147
endfunction()
151148

152149
configure_file(

0 commit comments

Comments
 (0)