-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (28 loc) · 983 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
cmake_minimum_required(VERSION 3.1)
project(AbstractVM
VERSION 0.1
DESCRIPTION "RPN calculator virtual machine with assembly like syntax"
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror")
add_library(avmlib STATIC vm/sources/exceptions.cpp
vm/sources/operandFactory.cpp
vm/sources/vm.cpp)
target_include_directories(avmlib PUBLIC vm/includes)
add_executable(avm src/sources/main.cpp
src/sources/lexer.cpp
src/sources/parser.cpp)
target_include_directories(avm PRIVATE src/includes)
target_link_libraries(avm PRIVATE avmlib)
find_package(Catch2 REQUIRED)
add_executable(unit_tests tests/sources/main.cpp
tests/sources/basicTests.cpp
tests/sources/typeComparisonTests.cpp
tests/sources/overflowTests.cpp
tests/sources/assertionTests.cpp
tests/sources/negativeTests.cpp)
target_link_libraries(unit_tests avmlib)
target_link_libraries(unit_tests Catch2::Catch2)
include(CTest)
include(Catch)
catch_discover_tests(unit_tests)