File tree 1 file changed +11
-0
lines changed
applications/zpc/components/zwave/zwave_transports/s2/libs/zw-libs2/TestFramework
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,17 @@ if (NOT COMMAND ADD_UNITY_TEST)
103
103
endif ()
104
104
endfunction (ADD_UNITY_TEST)
105
105
106
+ # compile the unity version bundled along with cmock sources.
107
+ add_library (unity cmock/vendor/unity/src/unity.c)
108
+ target_include_directories (unity PUBLIC cmock/vendor/unity/src)
109
+ target_compile_options (unity PRIVATE "-fPIC" )
110
+
111
+ # Build the cmock library and link the above compiled unity with the cmock library
112
+ add_library (cmock STATIC cmock/src/cmock.c)
113
+ target_include_directories (cmock PUBLIC cmock/src)
114
+ target_link_libraries (cmock PUBLIC unity)
115
+ target_compile_options (cmock PRIVATE "-fPIC" )
116
+
106
117
# Check whether the building of mock framework is disabled.
107
118
# Building of the mock framework can be disabled by chip vendors simply by adding the following line to the specific project at higher level:
108
119
# e.g.: set(DISABLE_MOCK 1)
You can’t perform that action at this time.
0 commit comments