summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2022-03-01 16:27:30 +0100
committerAndreas Schneider <asn@cryptomilk.org>2023-02-16 15:31:29 +0100
commitce438139bfb3f00d8b01465887d474a52a0e2569 (patch)
treeb647117fb0269346bd53f2999a34f8a4cfcce8fc
parent5ead982c0ca40c265ef79dfc4c222b5d10a69079 (diff)
downloadcmocka-ce438139bfb3f00d8b01465887d474a52a0e2569.zip
cmocka-ce438139bfb3f00d8b01465887d474a52a0e2569.tar.gz
cmocka-ce438139bfb3f00d8b01465887d474a52a0e2569.tar.bz2
examples: Add missing compile and link options
-rw-r--r--example/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index f983035..126a2e9 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -12,12 +12,15 @@ set_source_files_properties(calculator.c
add_cmocka_test(simple_test
SOURCES simple_test.c
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
+ LINK_OPTIONS ${DEFAULT_LINK_FLAGS}
LINK_LIBRARIES cmocka::cmocka)
add_cmocka_test_environment(simple_test)
### Allocate module test
add_cmocka_test(allocate_module_test
SOURCES allocate_module.c allocate_module_test.c
+ COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
+ LINK_OPTIONS ${DEFAULT_LINK_FLAGS}
LINK_LIBRARIES cmocka::cmocka)
add_cmocka_test_environment(allocate_module_test)
@@ -28,6 +31,8 @@ set_tests_properties(allocate_module_test
### Assert macro test
add_cmocka_test(assert_macro_test
SOURCES assert_macro.c assert_macro_test.c
+ COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
+ LINK_OPTIONS ${DEFAULT_LINK_FLAGS}
LINK_LIBRARIES cmocka::cmocka)
add_cmocka_test_environment(assert_macro_test)
@@ -38,6 +43,8 @@ set_tests_properties(assert_macro_test
### Assert module test
add_cmocka_test(assert_module_test
SOURCES assert_module.c assert_module_test.c
+ COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
+ LINK_OPTIONS ${DEFAULT_LINK_FLAGS}
LINK_LIBRARIES cmocka::cmocka)
add_cmocka_test_environment(assert_module_test)