2018-02-10 13:38:15 -08:00
|
|
|
cmake_minimum_required(VERSION 2.7)
|
|
|
|
|
|
|
|
if(TARGET abacus)
|
|
|
|
return()
|
|
|
|
endif(TARGET abacus)
|
|
|
|
|
|
|
|
project(libabacus)
|
|
|
|
|
|
|
|
add_compile_options(-pedantic -Wall)
|
|
|
|
|
2018-02-25 23:09:35 -08:00
|
|
|
add_library(abacus STATIC src/lexer.c src/util.c src/table.c src/parser.c src/libabacus.c src/tree.c src/debug.c)
|
2018-02-10 13:38:15 -08:00
|
|
|
add_executable(libabacus src/main.c)
|
2018-02-10 13:52:33 -08:00
|
|
|
add_subdirectory(external/liblex)
|
2018-02-10 13:38:15 -08:00
|
|
|
|
2018-02-10 13:52:33 -08:00
|
|
|
set_property(TARGET abacus PROPERTY C_STANDARD 90)
|
2018-02-10 13:38:15 -08:00
|
|
|
set_property(TARGET libabacus PROPERTY C_STANDARD 90)
|
2018-02-10 13:52:33 -08:00
|
|
|
target_include_directories(abacus PUBLIC include)
|
2018-02-10 13:38:15 -08:00
|
|
|
target_include_directories(libabacus PUBLIC include)
|
2018-02-10 13:52:33 -08:00
|
|
|
|
|
|
|
target_link_libraries(abacus lex)
|
|
|
|
target_link_libraries(libabacus abacus)
|