-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
53 lines (44 loc) · 1.28 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
52
53
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
# Set the project name
project(testRunner)
# Enable testing
enable_testing()
# Set the C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS False)
# Add sub directories
add_subdirectory(Moira)
add_subdirectory(Runner/Binutils)
add_subdirectory(Runner/Musashi)
# Add the executable
add_executable(testRunner
Runner/main.cpp
Runner/Testrunner.cpp
Runner/TestCPU.cpp
Runner/musashi.cpp
Runner/Sandbox.cpp
Runner/Randomizer.cpp
)
target_link_libraries(testRunner binutils)
target_link_libraries(testRunner moira)
target_link_libraries(testRunner musashi)
# Add compile options
if(MSVC)
target_compile_options(testRunner PUBLIC /wd4100 /wd4201 /wd4324 /wd4458)
else()
target_compile_options(testRunner PUBLIC -Wno-unused-parameter)
target_compile_options(testRunner PUBLIC -Wno-unused-variable)
target_compile_options(testRunner PUBLIC -Wno-gnu-anonymous-struct)
target_compile_options(testRunner PUBLIC -Wno-nested-anon-types)
endif()
# Add include paths
target_include_directories(testRunner PUBLIC
${CMAKE_SOURCE_DIR}/.
${CMAKE_SOURCE_DIR}/Moira
${CMAKE_SOURCE_DIR}/Runner
${CMAKE_SOURCE_DIR}/Runner/Binutils
${CMAKE_SOURCE_DIR}/Runner/Musashi
)
# Add tests
add_test(UnitTest testRunner)