-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (36 loc) · 1 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 3.14)
project(shine)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include(PVS-Studio)
Include(FetchContent)
if(MSVC)
add_compile_options(/W4 /WX)
else()
add_compile_options(-Wall -Wextra -pedantic -Wno-unknown-pragmas)
endif()
find_package(LLVM 8.0 REQUIRED)
include_directories(
SYSTEM ${LLVM_INCLUDE_DIRS}
src
include/shine
)
#add_definitions(-DDEBUG_PARSER)
add_subdirectory(libast)
add_subdirectory(liblexer)
add_subdirectory(libutils)
add_subdirectory(tests)
FILE(GLOB SRCSPP
src/*.cpp
src/*/*.cpp
src/*/*/*.cpp
)
add_executable(shine ${SRCSPP})
target_link_libraries(shine ${LLVM_LIBRARIES} ${LLVM_LDFLAGS} shineast shinelexer shineutils)
option(ENABLE_PVS_OPTION "Enable PVS Studio" FALSE)
if (ENABLE_PVS_OPTION)
pvs_studio_add_target(TARGET shine.analyze ALL
OUTPUT FORMAT errorfile
ANALYZE shine
LOG shine.err)
endif (ENABLE_PVS_OPTION)