Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 26b9220

Browse files
author
Chris Bieneman
committed
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279160 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 99174eb commit 26b9220

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

runtimes/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ else() # if this is included from LLVM's CMake
7373
string(REPLACE "-" "_" canon_name ${projName})
7474
string(TOUPPER ${canon_name} canon_name)
7575
list(APPEND prefixes ${canon_name})
76+
77+
string(FIND ${projName} "lib" LIB_IDX)
78+
if(LIB_IDX EQUAL 0)
79+
string(SUBSTRING ${projName} 3 -1 projName)
80+
endif()
81+
list(APPEND runtime_names ${projName})
7682
endforeach()
7783

7884
if(runtimes)
@@ -85,6 +91,7 @@ else() # if this is included from LLVM's CMake
8591
# Builtins were built separately above
8692
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
8793
PASSTHROUGH_PREFIXES ${prefixes}
94+
EXTRA_TARGETS ${runtime_names}
8895
USE_TOOLCHAIN)
8996
endif()
9097
endif()

0 commit comments

Comments
 (0)