forked from llvm/circt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
25 lines (24 loc) · 1 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# ===- CMakeLists.txt - include frontends if they are enabled --*- cmake -*-===//
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ===-----------------------------------------------------------------------===//
set (CIRCT_KNOWN_FRONTENDS
PyCDE)
option(CIRCT_ENABLE_FRONTENDS "")
foreach(proj ${CIRCT_KNOWN_FRONTENDS})
string(TOUPPER "${proj}" upper_proj)
string(REGEX REPLACE "-" "_" upper_proj ${upper_proj})
if ("${proj}" IN_LIST CIRCT_ENABLE_FRONTENDS)
message(STATUS "${proj} project is enabled")
set(PROJ_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${proj}")
if(NOT EXISTS "${PROJ_DIR}" OR NOT IS_DIRECTORY "${PROJ_DIR}")
message(FATAL_ERROR "CIRCT_ENABLE_FRONTENDS requests ${proj} but directory not found: ${PROJ_DIR}")
endif()
add_subdirectory(${PROJ_DIR})
else()
message(STATUS "${proj} project is disabled")
endif()
endforeach()