summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2013-12-01 21:55:44 -0800
committerChad Versace <chad.versace@linux.intel.com>2013-12-01 22:03:04 -0800
commitc56327e97b21fb53dc6e7da7f4ff384427fff73d (patch)
tree75759919ebbe8106e99d9beaf505d6d353b73850
parent8123e54dd6425d828ad8a281cebebcdfd2ad896e (diff)
cmake: Don't build unittests when waffle_build_tests=0
Return early from add_unittest() if waffle_build_tests=0, making the function a no-op. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--src/waffle/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt
index 93cb224..d1ae927 100644
--- a/src/waffle/CMakeLists.txt
+++ b/src/waffle/CMakeLists.txt
@@ -205,6 +205,10 @@ set_target_properties(waffle_static
# ----------------------------------------------------------------------------
function(add_unittest unittest_name)
+ if(NOT waffle_build_tests)
+ return()
+ endif()
+
add_executable(${unittest_name} ${ARGN})
set_target_properties(${unittest_name}
PROPERTIES