Skip to content

Commit

Permalink
[CMake] Create convenience targets for runtime projects
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Chris Bieneman committed Aug 18, 2016
1 parent 99174eb commit 26b9220
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()

0 comments on commit 26b9220

Please sign in to comment.