Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
26
Issues
26
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
932c8472
Commit
932c8472
authored
Mar 14, 2016
by
Andreas Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMake uses C99.
parent
09366a58
Pipeline
#82
passed with stage
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
3 deletions
+11
-3
CMakeLists.txt
CMakeLists.txt
+4
-0
src/CMakeLists.txt
src/CMakeLists.txt
+2
-0
src/prrt/CMakeLists.txt
src/prrt/CMakeLists.txt
+2
-1
tests/CMakeLists.txt
tests/CMakeLists.txt
+1
-0
tests/PrrtBlock_tests.cpp
tests/PrrtBlock_tests.cpp
+2
-2
No files found.
CMakeLists.txt
View file @
932c8472
...
...
@@ -5,6 +5,10 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set
(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/build
)
set
(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${
CMAKE_BINARY_DIR
}
/bin
)
set
(
CMAKE_CXX_FLAGS
"-fstack-protector -fstack-protector-all -Wall -pedantic"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-O2 -Wall -ggdb"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"-Os -Wall"
)
enable_testing
()
find_package
(
Threads
)
...
...
src/CMakeLists.txt
View file @
932c8472
...
...
@@ -2,7 +2,9 @@ add_subdirectory(prrt)
add_subdirectory
(
util
)
add_executable
(
sender sender.c
)
set_property
(
TARGET sender PROPERTY C_STANDARD 99
)
add_executable
(
receiver receiver.c
)
set_property
(
TARGET receiver PROPERTY C_STANDARD 99
)
target_link_libraries
(
sender LINK_PUBLIC PRRT UTIL
${
CMAKE_THREAD_LIBS_INIT
}
)
target_link_libraries
(
receiver LINK_PUBLIC PRRT UTIL
${
CMAKE_THREAD_LIBS_INIT
}
)
\ No newline at end of file
src/prrt/CMakeLists.txt
View file @
932c8472
add_library
(
PRRT ../defines.h socket.c block.c block.h packet.c packet.h receiver.c receiver.h clock.c clock.h channelStateInformation.c channelStateInformation.h processes/feedback_receiver.c processes/feedback_receiver.h processes/data_transmitter.c processes/data_transmitter.h coding_params.c coding_params.h vdmcode/block_code.c vdmcode/block_code.h coding_params.c coding_params.h stores/forward_packet_table.c stores/forward_packet_table.h processes/data_receiver.c processes/data_receiver.h
)
\ No newline at end of file
add_library
(
PRRT ../defines.h socket.c block.c block.h packet.c packet.h receiver.c receiver.h clock.c clock.h channelStateInformation.c channelStateInformation.h processes/feedback_receiver.c processes/feedback_receiver.h processes/data_transmitter.c processes/data_transmitter.h coding_params.c coding_params.h vdmcode/block_code.c vdmcode/block_code.h coding_params.c coding_params.h stores/forward_packet_table.c stores/forward_packet_table.h processes/data_receiver.c processes/data_receiver.h
)
set_property
(
TARGET PRRT PROPERTY C_STANDARD 99
)
\ No newline at end of file
tests/CMakeLists.txt
View file @
932c8472
...
...
@@ -2,4 +2,5 @@ add_subdirectory(lib/gtest-1.7.0)
include_directories
(
SYSTEM
${
gtest_SOURCE_DIR
}
/include
${
gtest_SOURCE_DIR
}
)
add_executable
(
prrtTests forward_packet_table_tests.cpp bptree_tests.cpp PrrtBlock_tests.cpp
)
set_property
(
TARGET prrtTests PROPERTY C_STANDARD 99
)
target_link_libraries
(
prrtTests LINK_PUBLIC PRRT UTIL gtest gtest_main
)
\ No newline at end of file
tests/PrrtBlock_tests.cpp
View file @
932c8472
...
...
@@ -106,7 +106,7 @@ TEST_F(PrrtBlockTest, EncodeDecode)
PrrtPacket
*
redPackets
=
(
PrrtPacket
*
)
calloc
(
4
,
sizeof
(
PrrtPacket
));
for
(
in
t
i
=
0
;
i
<
4
;
i
++
)
{
for
(
uint32_
t
i
=
0
;
i
<
4
;
i
++
)
{
char
data
[
3
];
sprintf
(
data
,
"%d"
,
i
);
packets
[
i
]
=
PrrtPacket_create_data_packet
(
0
,
data
,
(
uint32_t
)
strlen
(
data
),
i
+
1
);
...
...
@@ -117,7 +117,7 @@ TEST_F(PrrtBlockTest, EncodeDecode)
// ENCODING
ASSERT_TRUE
(
PrrtBlock_encode_ready
(
encBlock
));
in
t
j
=
0
;
uint32_
t
j
=
0
;
PrrtBlock_encode
(
encBlock
,
&
base
);
uint32_t
pkt_count
=
List_count
(
encBlock
->
dataPackets
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment