<div dir="ltr">On 2 December 2013 14:46, Chad Versace <span dir="ltr"><<a href="mailto:chad.versace@linux.intel.com" target="_blank">chad.versace@linux.intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This fixes an error in the Makefile-dependency of unittests, introduced<br>
in commit ad40427a864a7436953b319fbfdb2c04ccb7bdab.<br>
<br>
>From the perspective of Waffle's CMake, libcmocka.so is an *imported*<br>
library. In other words, it's a virtual target, represented by<br>
a '.PHONY' target in Unix Makefiles.<br>
<br>
To guarantee that libcmocka.so gets built, CMake must declare that the<br>
.PHONY 'cmocka' target depends on another .PHONY target, which does the<br>
actual building. Making 'cmocka' depend on a non-PHONY target doesn't<br>
work.<br>
<br>
Reported-by: Shazia Rahman <<a href="mailto:srahman@nvidia.com">srahman@nvidia.com</a>><br>
Reported-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
Signed-off-by: Chad Versace <<a href="mailto:chad.versace@linux.intel.com">chad.versace@linux.intel.com</a>><br></blockquote><div><br></div><div>That fixes the problem for me, thanks!<br><br></div><div>Tested-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
cmake/Modules/WaffleCMocka.cmake | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/cmake/Modules/WaffleCMocka.cmake b/cmake/Modules/WaffleCMocka.cmake<br>
index 635c31a..e276acd 100644<br>
--- a/cmake/Modules/WaffleCMocka.cmake<br>
+++ b/cmake/Modules/WaffleCMocka.cmake<br>
@@ -43,7 +43,7 @@ set_target_properties(cmocka<br>
PROPERTIES<br>
IMPORTED_LOCATION ${cmocka_library_location}<br>
)<br>
-add_dependencies(cmocka ${cmocka_library_location})<br>
+add_dependencies(cmocka cmocka-build)<br>
add_custom_command(<br>
OUTPUT ${cmocka_library_location}<br>
WORKING_DIRECTORY ${cmocka_build_dir}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
</font></span></blockquote></div><br></div></div>