-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (32 loc) · 992 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
36
37
38
cmake_minimum_required(VERSION 3.0.0)
project(ted VERSION 0.1.0)
option(BUILD_TEDC "Build Ted Compiler" ON)
option(BUILD_TEDOC "Build Ted Doc (Story Generator)" ON)
option(BUILD_TEDIFY "Build Tedify Tool" ON)
option(TED_TESTS "Apply Ted Tests" ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
if (UNIX)
set(USE_THREADS TRUE BOOL "Use Threads in Unix")
else()
set(USE_THREADS FALSE BOOL "Do not use Threads in Windows")
endif()
if (USE_THREADS)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
endif()
if (TED_TESTS)
enable_testing()
endif()
if (BUILD_TEDC)
add_subdirectory(ted)
endif()
if (BUILD_TEDIFY)
add_subdirectory(tedify)
endif()
if (BUILD_TEDOC)
add_subdirectory(tedoc)
endif()