From 1bb239c091f636aab56533818c4cb80ef059cb52 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 18 Aug 2016 21:47:18 +0000 Subject: [PATCH] [CMake] Create convenience targets for runtime projects Each runtime project has a top-level target that is the name of the runtime (minus the "lib" prefix if applicable). This creates top-level targets mapping to runtime projects. llvm-svn: 279160 --- llvm/runtimes/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index a155cac..3f9febc 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -73,6 +73,12 @@ else() # if this is included from LLVM's CMake string(REPLACE "-" "_" canon_name ${projName}) string(TOUPPER ${canon_name} canon_name) list(APPEND prefixes ${canon_name}) + + string(FIND ${projName} "lib" LIB_IDX) + if(LIB_IDX EQUAL 0) + string(SUBSTRING ${projName} 3 -1 projName) + endif() + list(APPEND runtime_names ${projName}) endforeach() if(runtimes) @@ -85,6 +91,7 @@ else() # if this is included from LLVM's CMake # Builtins were built separately above CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off PASSTHROUGH_PREFIXES ${prefixes} + EXTRA_TARGETS ${runtime_names} USE_TOOLCHAIN) endif() endif() -- 2.7.4