elna/CMakeLists.txt

31 lines
1001 B
CMake

cmake_minimum_required(VERSION 3.21)
project(Elna)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_CXX_STANDARD 17)
find_package(Boost COMPONENTS program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
add_executable(tester tests/runner.cpp include/elna/tester.hpp)
target_include_directories(tester PRIVATE include)
add_executable(elnsh shell/main.cpp
shell/interactive.cpp include/elna/interactive.hpp
shell/history.cpp include/elna/history.hpp
shell/state.cpp include/elna/state.hpp
)
target_include_directories(elnsh PRIVATE include)
add_executable(elna source/main.cpp
source/lexer.cpp include/elna/lexer.hpp
source/result.cpp include/elna/result.hpp
source/riscv.cpp include/elna/riscv.hpp
source/parser.cpp include/elna/parser.hpp
source/ir.cpp include/elna/ir.hpp
source/cl.cpp include/elna/cl.hpp
)
target_include_directories(elna PRIVATE include)
target_link_libraries(elna LINK_PUBLIC ${Boost_LIBRARIES})