This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
pacciani/CMakeLists.txt

42 lines
1.3 KiB
CMake
Raw Normal View History

2014-11-29 00:47:50 +01:00
#
2014-11-29 21:38:52 +01:00
# Monicelli: an esoteric language compiler
2014-11-29 00:47:50 +01:00
#
# Copyright (C) 2014 Stefano Sanfilippo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
2014-11-29 21:44:47 +01:00
project(Monicelli)
cmake_minimum_required(VERSION 2.8)
2014-11-29 21:44:47 +01:00
find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
2014-11-29 21:44:47 +01:00
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)
2014-11-29 21:44:47 +01:00
add_definitions(-Wall -Wno-deprecated-register -std=c++0x -DYYDEBUG=0 -O2)
2014-11-29 21:44:47 +01:00
bison_target(Parser Monicelli.ypp ${CMAKE_CURRENT_BINARY_DIR}/Parser.cpp)
flex_target(Scanner Monicelli.lpp ${CMAKE_CURRENT_BINARY_DIR}/Lexer.cpp)
add_flex_bison_dependency(Scanner Parser)
2014-11-29 21:44:47 +01:00
add_executable(
mcc
main.cpp Nodes.cpp ${BISON_Parser_OUTPUTS} ${FLEX_Scanner_OUTPUTS}
)