<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">BTW: Maybe you should reconsider the use of cmake_policy(SET CMP0002 NEW) instead of the custom error message? Contrary to the custom error message it tells you which target is duplicate:</div><div class=""><br class=""></div><div class=""><div class="">CMake Error at CMakeLists.txt:3 (add_executable):</div><div class="">  add_executable cannot create target "testtarget" because another target with the</div><div class="">  same name already exists.  The existing target is an executable created in</div><div class="">  source directory "/Users/mbraun".  See documentation for policy CMP0002 for</div><div class="">  more details.</div></div><div class=""><br class=""></div><div class="">- Matthias</div><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 25, 2016, at 11:50 AM, Artem Belevich via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I assume you were configuring for an ARM variant.<div class="">It appears that Vector and Vector/NEON both have files called simple.c and need to have unique prefix for their targets.<div class=""><br class=""></div><div class="">Fixed in r267439</div><div class=""><br class=""></div><div class="">--Artem<br class=""><div class=""><br class=""></div><div class=""><div class=""><br class=""></div></div></div></div></div><div class="gmail_extra" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class="gmail_quote">On Sat, Apr 23, 2016 at 2:15 PM, Chris Matthews<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:chris.matthews@apple.com" target="_blank" class="">chris.matthews@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class="">After this commit the test suite fails cmake for me:<div class=""><br class=""></div><div class=""><br class=""></div><div class=""><pre style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51);" class=""><span title="CMake Error" style="color: white; background-color: red;" class="">CMake Error at cmake/modules/SingleMultiSource.cmake:45 (message):
</span>  Duplicate executable name!Please set unique prefix with
  llvm_target_prefix().
Call Stack (most recent call first):
  cmake/modules/SingleMultiSource.cmake:136 (get_unique_exe_name)
  cmake/modules/SingleMultiSource.cmake:175 (test_suite_add_executable)
  SingleSource/UnitTests/Vector/CMakeLists.txt:21 (llvm_singlesource)
</pre><div class=""><div class="h5"><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On Apr 22, 2016, at 3:53 PM, Artem Belevich via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class=""><div class=""><div class="">Author: tra<br class="">Date: Fri Apr 22 17:53:21 2016<br class="">New Revision: 267243<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=267243&view=rev" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=267243&view=rev</a><br class="">Log:<br class="">[test-suite] Added llvm_target_prefix() command to set unique target prefix.<br class=""><br class="">Differential Revision:<span class="Apple-converted-space"> </span><a href="http://reviews.llvm.org/D19423" target="_blank" class="">http://reviews.llvm.org/D19423</a><br class=""><br class="">Modified:<br class="">   test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt<br class="">   test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt<br class="">   test-suite/trunk/SingleSource/Regression/C++/CMakeLists.txt<br class="">   test-suite/trunk/SingleSource/Regression/C/CMakeLists.txt<br class="">   test-suite/trunk/cmake/modules/SingleMultiSource.cmake<br class=""><br class="">Modified: test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout-C%2B%2B/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout-C%2B%2B/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff</a><br class="">==============================================================================<br class="">--- test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt (original)<br class="">+++ test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/CMakeLists.txt Fri Apr 22 17:53:21 2016<br class="">@@ -1,3 +1,4 @@<br class="">+llvm_target_prefix("shootout-cxx")<br class="">list(APPEND CXXFLAGS -Wno-deprecated)<br class="">list(APPEND CPPFLAGS -Wno-deprecated)<br class="">set(FP_TOLERANCE 0.00000001)<br class=""><br class="">Modified: test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff</a><br class="">==============================================================================<br class="">--- test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt (original)<br class="">+++ test-suite/trunk/SingleSource/Benchmarks/Shootout/CMakeLists.txt Fri Apr 22 17:53:21 2016<br class="">@@ -1,3 +1,4 @@<br class="">+llvm_target_prefix("shootout")<br class="">list(APPEND LDFLAGS -lm)<br class="">if(ARCH STREQUAL "XCore")<br class="">  set(XCORE_TARGET_NEEDS_MEMORY 256)<br class=""><br class="">Modified: test-suite/trunk/SingleSource/Regression/C++/CMakeLists.txt<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff</a><br class="">==============================================================================<br class="">--- test-suite/trunk/SingleSource/Regression/C++/CMakeLists.txt (original)<br class="">+++ test-suite/trunk/SingleSource/Regression/C++/CMakeLists.txt Fri Apr 22 17:53:21 2016<br class="">@@ -1,3 +1,4 @@<br class="">+llvm_target_prefix("regression-cxx")<br class="">list(APPEND LDFLAGS -lstdc++)<br class="">llvm_singlesource()<br class=""><br class=""><br class="">Modified: test-suite/trunk/SingleSource/Regression/C/CMakeLists.txt<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C/CMakeLists.txt?rev=267243&r1=267242&r2=267243&view=diff</a><br class="">==============================================================================<br class="">--- test-suite/trunk/SingleSource/Regression/C/CMakeLists.txt (original)<br class="">+++ test-suite/trunk/SingleSource/Regression/C/CMakeLists.txt Fri Apr 22 17:53:21 2016<br class="">@@ -1,3 +1,4 @@<br class="">+llvm_target_prefix("regression-c")<br class="">if(ARCH STREQUAL "x86")<br class="">  if(DEFINED USE_REFERENCE_OUTPUT)<br class="">    set(EXEC_XFAILS casts)<br class=""><br class="">Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=267243&r1=267242&r2=267243&view=diff" target="_blank" class="">http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=267243&r1=267242&r2=267243&view=diff</a><br class="">==============================================================================<br class="">--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)<br class="">+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Fri Apr 22 17:53:21 2016<br class="">@@ -13,18 +13,27 @@<br class=""><br class="">include(TestFile)<br class=""><br class="">+<br class="">+# Set unique target prefix within caller's scope.<br class="">+function(llvm_target_prefix prefix)<br class="">+  if(prefix)<br class="">+    set(TARGET_PREFIX "${prefix}-" PARENT_SCOPE)<br class="">+  else()<br class="">+    set(TARGET_PREFIX "" PARENT_SCOPE)<br class="">+  endif()<br class="">+endfunction()<br class="">+<br class=""># Given a source file name after which a test should be named, create a unique<br class=""># name for the test. Usually this is just the source file with the suffix<br class="">-# stripped, but in some cases this ends up causing duplicates so attempt to<br class="">-# make each unique (by adding pathname segments until they become unique).<br class="">-#<br class="">-# FIXME: Swap this with a simpler procedure to just append a numeral<br class="">+# stripped, and ${TARGET_PREFIX} prepended.<br class="">set_property(GLOBAL PROPERTY registered_executables)<br class="">function(get_unique_exe_name new_name main_src)<br class="">  get_property(registered_executables GLOBAL PROPERTY registered_executables)<br class=""><br class="">  string(REGEX REPLACE ".[cp]+$" "" path ${main_src})<br class="">-  string(REGEX REPLACE ".*/" "" name ${path})<br class="">+  get_filename_component(name ${path} NAME )<br class="">+  set(name "${TARGET_PREFIX}${name}")<br class="">+<br class="">  list(FIND registered_executables ${name} name_idx)<br class=""><br class="">  if(${name_idx} EQUAL -1)<br class="">@@ -33,20 +42,8 @@ function(get_unique_exe_name new_name ma<br class="">    return()<br class="">  endif()<br class=""><br class="">-  # There is a clash. Rename the target. Each time around the loop pull in<br class="">-  # a new path component.<br class="">-  foreach(n RANGE 1 4)<br class="">-    string(REGEX REPLACE ".*/([^/]+/${name})" "<a class="">\\1</a>" name ${path})<br class="">-    string(REGEX REPLACE "/" "-" safe_name ${name})<br class="">-<br class="">-    list(FIND registered_executables ${safe_name} name_idx)<br class="">-    if(${name_idx} EQUAL -1)<br class="">-      set(${new_name} ${safe_name} PARENT_SCOPE)<br class="">-      set_property(GLOBAL APPEND PROPERTY registered_executables ${safe_name})<br class="">-      return()<br class="">-    endif()<br class="">-  endforeach()<br class="">-  message(FATAL_ERROR "Failed to uniquify executable name!")<br class="">+  message(FATAL_ERROR "Duplicate executable name!"<br class="">+    "Please set unique prefix with llvm_target_prefix().")<br class="">endfunction()<br class=""><br class=""># Add flags to a cmake target property.<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div class="gmail_signature"><div dir="ltr" class="">--Artem Belevich</div></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">llvm-commits mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:llvm-commits@lists.llvm.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">llvm-commits@lists.llvm.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></div></blockquote></div><br class=""></body></html>