-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
68 lines (57 loc) · 1.58 KB
/
CMakeLists.txt
File metadata and controls
68 lines (57 loc) · 1.58 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.10)
project(eigerc)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
enable_testing()
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/heads/main.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "Force gtest to use shared CRT" FORCE)
FetchContent_MakeAvailable(googletest)
add_executable(eigerc
src/main.cpp
src/Lexer.cpp
src/Parser.cpp
src/Compiler.cpp
src/VM.cpp
src/Util.cpp
src/Context.cpp
src/Scope.cpp
src/Compiler.hpp
src/Context.hpp
src/Error.hpp
src/Instruction.hpp
src/Lexer.hpp
src/Opcode.hpp
src/Parser.hpp
src/Scope.hpp
src/Util.hpp
src/VM.hpp
src/CmdOpts.hpp
src/EiObjects/EiObject.cpp
src/EiObjects/NumberObject.cpp
src/EiObjects/StringObject.cpp
src/EiObjects/BoolObject.hpp
src/EiObjects/DType.hpp
src/EiObjects/EiObject.hpp
src/EiObjects/FunctionObject.hpp
src/EiObjects/FunctionObject.cpp
src/EiObjects/NumberObject.hpp
src/EiObjects/StringObject.hpp
src/EiObjects/ArrayObject.hpp
)
add_executable(eigertest tests/runner.cpp)
add_custom_target(runAlways ALL)
add_custom_command(
TARGET runAlways
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${CMAKE_CURRENT_SOURCE_DIR}/tests"
"$<TARGET_FILE_DIR:eigertest>/tests"
COMMENT "Copying tests to eigertest build location"
)
target_link_libraries(eigertest gtest_main)
target_include_directories(${PROJECT_NAME} PRIVATE src src/EiObjects)