[PATCH] D19491: [test-suite] There is no need to check for name clashes explicitly.
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 13:26:03 PDT 2016
tra updated this revision to Diff 54891.
tra added a comment.
Removed registered_executables property.
http://reviews.llvm.org/D19491
Files:
cmake/modules/SingleMultiSource.cmake
Index: cmake/modules/SingleMultiSource.cmake
===================================================================
--- cmake/modules/SingleMultiSource.cmake
+++ cmake/modules/SingleMultiSource.cmake
@@ -26,24 +26,11 @@
# Given a source file name after which a test should be named, create a unique
# name for the test. Usually this is just the source file with the suffix
# stripped, and ${TARGET_PREFIX} prepended.
-set_property(GLOBAL PROPERTY registered_executables)
function(get_unique_exe_name new_name main_src)
- get_property(registered_executables GLOBAL PROPERTY registered_executables)
-
string(REGEX REPLACE ".[cp]+$" "" path ${main_src})
get_filename_component(name ${path} NAME )
- set(name "${TARGET_PREFIX}${name}")
- list(FIND registered_executables ${name} name_idx)
-
- if(${name_idx} EQUAL -1)
- set(${new_name} ${name} PARENT_SCOPE)
- set_property(GLOBAL APPEND PROPERTY registered_executables ${name})
- return()
- endif()
-
- message(FATAL_ERROR "Duplicate executable name!"
- "Please set unique prefix with llvm_target_prefix().")
+ set(${new_name} "${TARGET_PREFIX}${name}" PARENT_SCOPE)
endfunction()
# Add flags to a cmake target property.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19491.54891.patch
Type: text/x-patch
Size: 1199 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/8c6e67f4/attachment.bin>
More information about the llvm-commits
mailing list