diff --git a/streamlog/examples/CMakeLists.txt b/streamlog/examples/CMakeLists.txt
index c3d0b50a54bfee867f2815a54b652072e31be0a2..ca0b94c69de6c396e18ff8fae3a72959fa1accac 100644
--- a/streamlog/examples/CMakeLists.txt
+++ b/streamlog/examples/CMakeLists.txt
@@ -13,7 +13,9 @@ SET( test_bins test_log)
 ADD_SHARED_LIBRARY( streamlog_test EXCLUDE_FROM_ALL fibonacci.cc  )
 
 # create symbolic bin target
-ADD_CUSTOM_TARGET( tests )
+if (NOT TARGET tests)
+  ADD_CUSTOM_TARGET( tests )
+endif()
 
 # loop through list of test binaries
 FOREACH( bin ${test_bins} )