mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[CMake] Removing duplicates from the list of test suites to generate targets for.
Not doing this causes some headaches for users migrating from autoconf to CMake. llvm-svn: 233428
This commit is contained in:
parent
d055dfa615
commit
ce44007143
@ -803,8 +803,13 @@ function(add_lit_testsuites project directory)
|
|||||||
if (NOT CMAKE_CONFIGURATION_TYPES)
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
|
parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})
|
||||||
file(GLOB_RECURSE litCfg ${directory}/lit*.cfg)
|
file(GLOB_RECURSE litCfg ${directory}/lit*.cfg)
|
||||||
|
set(lit_suites)
|
||||||
foreach(f ${litCfg})
|
foreach(f ${litCfg})
|
||||||
get_filename_component(dir ${f} DIRECTORY)
|
get_filename_component(dir ${f} DIRECTORY)
|
||||||
|
set(lit_suites ${lit_suites} ${dir})
|
||||||
|
endforeach()
|
||||||
|
list(REMOVE_DUPLICATES lit_suites)
|
||||||
|
foreach(dir ${lit_suites})
|
||||||
string(REPLACE ${directory} "" name_slash ${dir})
|
string(REPLACE ${directory} "" name_slash ${dir})
|
||||||
if (name_slash)
|
if (name_slash)
|
||||||
string(REPLACE "/" "-" name_slash ${name_slash})
|
string(REPLACE "/" "-" name_slash ${name_slash})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user