Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loop file names in examples' CMakeLists.txt #175

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 19 additions & 53 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,21 @@
build_lib_example(
NAME simple-network-example
SOURCE_FILES simple-network-example.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
set(base_examples
simple-network-example
network-server-example
complete-network-example
adr-example
lorawan-energy-model-example
aloha-throughput
parallel-reception-example
frame-counter-update
)

build_lib_example(
NAME network-server-example
SOURCE_FILES network-server-example.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)

build_lib_example(
NAME complete-network-example
SOURCE_FILES complete-network-example.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)

build_lib_example(
NAME adr-example
SOURCE_FILES adr-example.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)

build_lib_example(
NAME lorawan-energy-model-example
SOURCE_FILES lorawan-energy-model-example.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)

build_lib_example(
NAME aloha-throughput
SOURCE_FILES aloha-throughput.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)

build_lib_example(
NAME parallel-reception-example
SOURCE_FILES parallel-reception-example.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)

build_lib_example(
NAME frame-counter-update
SOURCE_FILES frame-counter-update.cc
LIBRARIES_TO_LINK ${libcore}
${liblorawan}
)
foreach(
example
${base_examples}
)
build_lib_example(
NAME ${example}
SOURCE_FILES ${example}.cc
LIBRARIES_TO_LINK ${liblorawan}
)
endforeach()