mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[Flang] add flang as a new subproject in cmake
Summary: This patch is some minor prep work for merging the flang(f18) project into the monorepo. This patch adds "flang" as a supported target for the LLVM_ENABLE_PROJECTS option. Reviewers: fhahn, tstellar, jdoerfert, beanz, DavidTruby Reviewed By: DavidTruby Subscribers: hfinkel, DavidTruby, aartbik, mgorny, llvm-commits Tags: #flang, #llvm Differential Revision: https://reviews.llvm.org/D72416
This commit is contained in:
parent
4e6f8839a7
commit
9247ec34a6
@ -64,8 +64,12 @@ endif()
|
||||
# This allows an easy way of setting up a build directory for llvm and another
|
||||
# one for llvm+clang+... using the same sources.
|
||||
set(LLVM_ALL_PROJECTS "clang;clang-tools-extra;compiler-rt;debuginfo-tests;libc;libclc;libcxx;libcxxabi;libunwind;lld;lldb;mlir;openmp;parallel-libs;polly;pstl")
|
||||
# The flang project is not yet part of "all" projects (see C++ requirements)
|
||||
set(LLVM_EXTRA_PROJECTS "flang")
|
||||
# List of all known projects in the mono repo
|
||||
set(LLVM_KNOWN_PROJECTS "${LLVM_ALL_PROJECTS};${LLVM_EXTRA_PROJECTS}")
|
||||
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
|
||||
"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
|
||||
"Semicolon-separated list of projects to build (${LLVM_KNOWN_PROJECTS}), or \"all\".")
|
||||
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
|
||||
set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS})
|
||||
endif()
|
||||
@ -89,7 +93,7 @@ mark_as_advanced(LLVM_ENABLE_PROJECTS_USED)
|
||||
|
||||
if (LLVM_ENABLE_PROJECTS_USED OR NOT LLVM_ENABLE_PROJECTS STREQUAL "")
|
||||
set(LLVM_ENABLE_PROJECTS_USED ON CACHE BOOL "" FORCE)
|
||||
foreach(proj ${LLVM_ALL_PROJECTS} ${LLVM_EXTERNAL_PROJECTS})
|
||||
foreach(proj ${LLVM_KNOWN_PROJECTS} ${LLVM_EXTERNAL_PROJECTS})
|
||||
string(TOUPPER "${proj}" upper_proj)
|
||||
string(REGEX REPLACE "-" "_" upper_proj ${upper_proj})
|
||||
if ("${proj}" IN_LIST LLVM_ENABLE_PROJECTS)
|
||||
|
@ -37,6 +37,8 @@ add_llvm_external_project(clang)
|
||||
add_llvm_external_project(lld)
|
||||
add_llvm_external_project(lldb)
|
||||
add_llvm_external_project(mlir)
|
||||
# Flang depends on mlir, so place it afterward
|
||||
add_llvm_external_project(flang)
|
||||
|
||||
# Automatically add remaining sub-directories containing a 'CMakeLists.txt'
|
||||
# file as external projects.
|
||||
|
Loading…
Reference in New Issue
Block a user