summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-12-02 14:39:24 -0800
committerChad Versace <chad.versace@linux.intel.com>2013-12-02 15:00:06 -0800
commit8eca79929fd2033f0a8cb130bd8167354fdb333b (patch)
tree70c14c6ff0500bf7134c95f94e592123e5647c19
parent4af8f140f6cadd9b486c3826c952f790478625de (diff)
cmake: Fix dependency on cmocka
This fixes an error in the Makefile-dependency of unittests, introduced in commit ad40427a864a7436953b319fbfdb2c04ccb7bdab. From the perspective of Waffle's CMake, libcmocka.so is an *imported* library. In other words, it's a virtual target, represented by a '.PHONY' target in Unix Makefiles. To guarantee that libcmocka.so gets built, CMake must declare that the .PHONY 'cmocka' target depends on another .PHONY target, which does the actual building. Making 'cmocka' depend on a non-PHONY target doesn't work. Reported-by: Shazia Rahman <srahman@nvidia.com> Reported-by: Paul Berry <stereotype441@gmail.com> Tested-by: Paul Berry <stereotype441@gmail.com> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--cmake/Modules/WaffleCMocka.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/Modules/WaffleCMocka.cmake b/cmake/Modules/WaffleCMocka.cmake
index 635c31a..e276acd 100644
--- a/cmake/Modules/WaffleCMocka.cmake
+++ b/cmake/Modules/WaffleCMocka.cmake
@@ -43,7 +43,7 @@ set_target_properties(cmocka
PROPERTIES
IMPORTED_LOCATION ${cmocka_library_location}
)
-add_dependencies(cmocka ${cmocka_library_location})
+add_dependencies(cmocka cmocka-build)
add_custom_command(
OUTPUT ${cmocka_library_location}
WORKING_DIRECTORY ${cmocka_build_dir}