Skip to content

Commit

Permalink
Update CMakeLists syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
DvdMgr committed Jan 31, 2022
1 parent 2b352bc commit e8f7a21
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 53 deletions.
23 changes: 12 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
set(name lorawan)

set(source_files
model/lora-net-device.cc
model/lorawan-mac.cc
Expand Down Expand Up @@ -101,18 +99,21 @@ set(header_files
test/utilities.h
)

set(libraries_to_link ${libnetwork} ${libpropagation} ${libenergy}
${libpoint-to-point} ${libbuildings} ${libmobility}
)

set(test_sources
build_lib(
LIBNAME lorawan
SOURCE_FILES ${source_files}
HEADER_FILES ${header_files}
LIBRARIES_TO_LINK
${libnetwork}
${libpropagation}
${libenergy}
${libpoint-to-point}
${libbuildings}
${libmobility}
TEST_SOURCES
test/utilities.cc
test/lorawan-test-suite.cc
test/network-status-test-suite.cc
test/network-scheduler-test-suite.cc
test/network-server-test-suite.cc
)

build_lib("${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
"${test_sources}"
)
79 changes: 39 additions & 40 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,63 +1,62 @@
set(name simple-network-example)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME simple-network-example
SOURCE_FILES simple-network-example.cc
LIBRARIES_TO_LINK
${libcore} ${liblorawan}
)

set(name network-server-example)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME network-server-example
SOURCE_FILES network-server-example.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)

set(name complete-network-example)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME complete-network-example
SOURCE_FILES complete-network-example.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)

set(name adr-example)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME adr-example
SOURCE_FILES adr-example.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)

set(name energy-model-example)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME lorawan-energy-model-example
SOURCE_FILES lorawan-energy-model-example.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)

set(name aloha-throughput)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME aloha-throughput
SOURCE_FILES aloha-throughput.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)

set(name parallel-reception-example)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME parallel-reception-example
SOURCE_FILES parallel-reception-example.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)

set(name frame-counter-update)
set(source_files ${name}.cc)
set(header_files)
set(libraries_to_link ${libcore} ${liblorawan})
build_lib_example(
"${name}" "${source_files}" "${header_files}" "${libraries_to_link}"
NAME frame-counter-update
SOURCE_FILES frame-counter-update.cc
LIBRARIES_TO_LINK
${libcore}
${liblorawan}
)
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def build(bld):
obj = bld.create_ns3_program('adr-example', ['lorawan'])
obj.source = 'adr-example.cc'

obj = bld.create_ns3_program('energy-model-example', ['lorawan'])
obj.source = 'energy-model-example.cc'
obj = bld.create_ns3_program('lorawan-energy-model-example', ['lorawan'])
obj.source = 'lorawan-energy-model-example.cc'

obj = bld.create_ns3_program('aloha-throughput', ['lorawan'])
obj.source = 'aloha-throughput.cc'
Expand Down

0 comments on commit e8f7a21

Please sign in to comment.