cmake_minimum_required(VERSION 3.0)

set(CMAKE_CXX_STANDARD          17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS        OFF)

set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")


project(usql)

set(PROJECT_NAME usql)

include_directories(${CMAKE_SOURCE_DIR}/clib ${CMAKE_SOURCE_DIR})

set(SOURCE
	exception.cpp lexer.cpp parser.cpp usql.cpp main.cpp table.cpp table.h row.cpp row.h csvreader.cpp csvreader.h ml_date.cpp settings.cpp clib/ml_string.cpp clib/linenoise.c)

add_executable(${PROJECT_NAME} ${SOURCE})

target_link_libraries(${PROJECT_NAME} stdc++ m)

target_compile_options(usql PRIVATE -g)
