Skip to content

Commit

Permalink
Switched to CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtahu committed Apr 28, 2013
1 parent a4ad682 commit dae27f8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 24 deletions.
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 2.8)

project(LangS)

find_package(BISON)
find_package(FLEX)

find_program(bison "bison")
find_program(flex "flex")

file(GLOB sources *.cpp)

add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/LangS.tab.cpp
DEPENDS LangS.ypp
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND @bison@ -d ${CMAKE_CURRENT_SOURCE_DIR}/LangS.ypp VERBATIM)

add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/LangS.yy.cpp
DEPENDS LangS.l
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND @flex@ -o ${CMAKE_CURRENT_SOURCE_DIR}/LangS.yy.cpp ${CMAKE_CURRENT_SOURCE_DIR}/LangS.l VERBATIM)

set_source_files_properties(LangS.tab.cpp PROPERTIES GENERATED True)
set_source_files_properties(LangS.tab.hpp PROPERTIES GENERATED True)
set_source_files_properties(LangS.yy.cpp PROPERTIES GENERATED True)


add_executable(LangS LangS.tab.cpp LangS.yy.cpp @sources@)

24 changes: 0 additions & 24 deletions Makefile

This file was deleted.

0 comments on commit dae27f8

Please sign in to comment.