• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) PLUMgrid, Inc.
2# Licensed under the Apache License, Version 2.0 (the "License")
3
4include_directories(${CMAKE_CURRENT_BINARY_DIR})
5include_directories(${CMAKE_CURRENT_SOURCE_DIR})
6
7BISON_TARGET(Parser parser.yy ${CMAKE_CURRENT_BINARY_DIR}/parser.yy.cc COMPILE_FLAGS "-o parser.yy.cc -v --debug")
8FLEX_TARGET(Lexer lexer.ll ${CMAKE_CURRENT_BINARY_DIR}/lexer.ll.cc COMPILE_FLAGS "--c++ --o lexer.ll.cc")
9ADD_FLEX_BISON_DEPENDENCY(Lexer Parser)
10if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
11  set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/lexer.ll.cc PROPERTIES COMPILE_FLAGS "-Wno-deprecated-register")
12endif()
13
14add_library(b_frontend STATIC loader.cc codegen_llvm.cc node.cc parser.cc printer.cc
15  type_check.cc ${BISON_Parser_OUTPUTS} ${FLEX_Lexer_OUTPUTS})
16