-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (27 loc) · 882 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(qlisp VERSION 1.0.0 LANGUAGES CXX)
set(TARGET "qlisp")
set(src "../src")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (WIN32)
set(platform_sources ${src}/platform/win32.cpp)
elseif (UNIX)
set(platform_sources ${src}/platform/linux.cpp)
endif ()
# set(CMAKE_CXX_COMPILER g++)
set(sources
${platform_sources}
${src}/main.cpp ${src}/util.cpp ${src}/objects.cpp ${src}/interpreter.cpp)
set(CMAKE_CXX_STANDARD 20)
add_compile_options(-Wall)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DDEBUG)
add_compile_options(-Wall -O0 -g3 -ggdb -gdwarf-3)
elseif (CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_options(-O3)
endif ()
add_executable(${TARGET} ${sources})
find_package(Threads)
target_link_libraries(${TARGET} ${CMAKE_THREAD_LIBS_INIT})
find_package(fmt)
target_link_libraries(${TARGET} fmt::fmt)