diff options
author | Sven Gothel <[email protected]> | 2020-08-25 05:24:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-08-25 05:24:17 +0200 |
commit | a6e68f1f2a70ffbc55f6da60fac3767db550e3b1 (patch) | |
tree | 5045b237efae0e9ee75e4ad677798ad77ab945eb /test | |
parent | d3fcf4948480b9ab7f426cf54475e54aee1ce79b (diff) |
cmake: Fix set_target_properties(..) use proper target name and add declaration where needed; Fix source accordingly.
Diffstat (limited to 'test')
-rw-r--r-- | test/direct_bt/CMakeLists.txt | 31 | ||||
-rw-r--r-- | test/direct_bt/test_attpdu01.cpp | 3 | ||||
-rw-r--r-- | test/direct_bt/test_basictypes01.cpp | 3 | ||||
-rw-r--r-- | test/direct_bt/test_functiondef01.cpp | 6 | ||||
-rw-r--r-- | test/direct_bt/test_lfringbuffer01.cpp | 5 | ||||
-rw-r--r-- | test/direct_bt/test_lfringbuffer11.cpp | 4 | ||||
-rw-r--r-- | test/direct_bt/test_uuid.cpp | 3 | ||||
-rw-r--r-- | test/ieee11073/CMakeLists.txt | 2 |
8 files changed, 52 insertions, 5 deletions
diff --git a/test/direct_bt/CMakeLists.txt b/test/direct_bt/CMakeLists.txt index 8e294b08..80bbe827 100644 --- a/test/direct_bt/CMakeLists.txt +++ b/test/direct_bt/CMakeLists.txt @@ -3,14 +3,39 @@ include_directories( ${PROJECT_SOURCE_DIR}/api ) -add_executable (test_functiondef01 test_functiondef01.cpp) +add_executable (test_functiondef01 test_functiondef01.cpp) add_executable (test_uuid test_uuid.cpp) add_executable (test_basictypes01 test_basictypes01.cpp) add_executable (test_attpdu01 test_attpdu01.cpp) add_executable (test_lfringbuffer01 test_lfringbuffer01.cpp) add_executable (test_lfringbuffer11 test_lfringbuffer11.cpp) -set_target_properties(list_mfg +set_target_properties(test_functiondef01 + PROPERTIES + CXX_STANDARD 11 + COMPILE_FLAGS "-Wall -Wextra -Werror" +) +set_target_properties(test_uuid + PROPERTIES + CXX_STANDARD 11 + COMPILE_FLAGS "-Wall -Wextra -Werror" +) +set_target_properties(test_basictypes01 + PROPERTIES + CXX_STANDARD 11 + COMPILE_FLAGS "-Wall -Wextra -Werror" +) +set_target_properties(test_attpdu01 + PROPERTIES + CXX_STANDARD 11 + COMPILE_FLAGS "-Wall -Wextra -Werror" +) +set_target_properties(test_lfringbuffer01 + PROPERTIES + CXX_STANDARD 11 + COMPILE_FLAGS "-Wall -Wextra -Werror" +) +set_target_properties(test_lfringbuffer11 PROPERTIES CXX_STANDARD 11 COMPILE_FLAGS "-Wall -Wextra -Werror" @@ -23,7 +48,7 @@ target_link_libraries (test_attpdu01 direct_bt) target_link_libraries (test_lfringbuffer01 direct_bt) target_link_libraries (test_lfringbuffer11 direct_bt) -add_test (NAME functiondef01 COMMAND test_functiondef01) +add_test (NAME functiondef01 COMMAND test_functiondef01) add_test (NAME basictypes01 COMMAND test_basictypes01) add_test (NAME uuid COMMAND test_uuid) add_test (NAME attpdu01 COMMAND test_attpdu01) diff --git a/test/direct_bt/test_attpdu01.cpp b/test/direct_bt/test_attpdu01.cpp index 194824ef..aac1df89 100644 --- a/test/direct_bt/test_attpdu01.cpp +++ b/test/direct_bt/test_attpdu01.cpp @@ -32,6 +32,9 @@ class Cppunit_tests: public Cppunit { }; int main(int argc, char *argv[]) { + (void)argc; + (void)argv; + Cppunit_tests test1; return test1.run(); } diff --git a/test/direct_bt/test_basictypes01.cpp b/test/direct_bt/test_basictypes01.cpp index e692697a..d44ac0c4 100644 --- a/test/direct_bt/test_basictypes01.cpp +++ b/test/direct_bt/test_basictypes01.cpp @@ -70,6 +70,9 @@ class Cppunit_tests : public Cppunit { }; int main(int argc, char *argv[]) { + (void)argc; + (void)argv; + Cppunit_tests test1; return test1.run(); } diff --git a/test/direct_bt/test_functiondef01.cpp b/test/direct_bt/test_functiondef01.cpp index 83b20fbd..02872b66 100644 --- a/test/direct_bt/test_functiondef01.cpp +++ b/test/direct_bt/test_functiondef01.cpp @@ -57,7 +57,8 @@ class Cppunit_tests : public Cppunit { } IntOffset& operator=(IntOffset &&o) { PRINTM("IntOffset::move_assign"); - value == std::move(o.value); + value = std::move(o.value); + (void)value; return *this; } @@ -309,6 +310,9 @@ class Cppunit_tests : public Cppunit { }; int main(int argc, char *argv[]) { + (void)argc; + (void)argv; + Cppunit_tests test1; return test1.run(); } diff --git a/test/direct_bt/test_lfringbuffer01.cpp b/test/direct_bt/test_lfringbuffer01.cpp index 97297513..98f3c101 100644 --- a/test/direct_bt/test_lfringbuffer01.cpp +++ b/test/direct_bt/test_lfringbuffer01.cpp @@ -56,6 +56,8 @@ class Cppunit_tests : public Cppunit { } void readTestImpl(Ringbuffer<SharedType> &rb, bool clearRef, int capacity, int len, int startValue) { + (void) clearRef; + int preSize = rb.getSize(); CHECKM("Wrong capacity "+rb.toString(), capacity, rb.capacity()); CHECKTM("Too low capacity to read "+std::to_string(len)+" elems: "+rb.toString(), capacity-len >= 0); @@ -325,6 +327,9 @@ class Cppunit_tests : public Cppunit { }; int main(int argc, char *argv[]) { + (void)argc; + (void)argv; + Cppunit_tests test1; return test1.run(); } diff --git a/test/direct_bt/test_lfringbuffer11.cpp b/test/direct_bt/test_lfringbuffer11.cpp index 43350395..3ec75b98 100644 --- a/test/direct_bt/test_lfringbuffer11.cpp +++ b/test/direct_bt/test_lfringbuffer11.cpp @@ -80,6 +80,7 @@ class Cppunit_tests : public Cppunit { fprintf(stderr, "%s: Created / %s\n", msg.c_str(), rb->toString().c_str()); int preSize = rb->getSize(); + (void)preSize; for(int i=0; i<len; i++) { Integer * vI = new Integer(startValue+i); @@ -172,6 +173,9 @@ class Cppunit_tests : public Cppunit { }; int main(int argc, char *argv[]) { + (void)argc; + (void)argv; + Cppunit_tests test1; return test1.run(); } diff --git a/test/direct_bt/test_uuid.cpp b/test/direct_bt/test_uuid.cpp index 44638373..9b1230a9 100644 --- a/test/direct_bt/test_uuid.cpp +++ b/test/direct_bt/test_uuid.cpp @@ -64,6 +64,9 @@ class Cppunit_tests : public Cppunit { }; int main(int argc, char *argv[]) { + (void)argc; + (void)argv; + Cppunit_tests test1; return test1.run(); } diff --git a/test/ieee11073/CMakeLists.txt b/test/ieee11073/CMakeLists.txt index 34cdbc41..1f144641 100644 --- a/test/ieee11073/CMakeLists.txt +++ b/test/ieee11073/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories( add_executable (test_datatypes01 test_datatypes01.cpp) -set_target_properties(list_mfg +set_target_properties(test_datatypes01 PROPERTIES CXX_STANDARD 11) |