-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
114 lines (92 loc) · 2.92 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
cmake_minimum_required(VERSION 3.21)
project(nxdk_pgraph_tests)
set(
CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_LIST_DIR}/cmake/modules/"
)
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "Generate verbose Makefile")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(_CMAKE_PROCESSING_LANGUAGE "CXX")
include(CheckSymbolExists)
include(FindPkgConfig)
# Determine if this build is for the Xbox or the host system.
if (CMAKE_TOOLCHAIN_FILE MATCHES "toolchain-nxdk.cmake")
set(IS_TARGET_BUILD ON)
else ()
set(IS_TARGET_BUILD OFF)
endif ()
add_subdirectory(third_party)
option(
NO_OPT
"Suppress optimization on core files that are typically optimized regardless of release/debug configuration"
OFF
)
option(
ENABLE_PROGRESS_LOG
"Write the name of each test to a log file on the target."
OFF
)
option(
DUMP_CONFIG_FILE
"Write a default config file and exit instead of running tests."
OFF
)
option(
DISABLE_AUTORUN
"Prevents the tests from being executed without user input."
OFF
)
option(
AUTORUN_IMMEDIATELY
"Remove the delay for input before starting automated testing."
OFF
)
option(
ENABLE_SHUTDOWN
"Cause the program to shut down the xbox on completion instead of rebooting."
OFF
)
option(
ENABLE_MULTIFRAME_CPU_BLIT_TEST
"Enables the MultiframeCPUBlit test within the Antialiasing tests. This test requires evaluation across multiple frames and thus cannot produce a usable golden artifact for automated validation. This should only be enabled for manual testing purposes."
OFF
)
option(
ENABLE_PGRAPH_REGION_DIFF
"Causes a diff of the nv2a PGRAPH registers to be done between the start and end of each test in order to detect state leakage. Output is logged to XBDM and will be written into the progress log if it is enabled."
OFF
)
set(
RUNTIME_CONFIG_PATH
"e:/nxdk_pgraph_tests/nxdk_pgraph_tests_config.json"
CACHE STRING
"Absolute XBOX-path to the location of a JSON configuration file to set options and filter the tests that are executed."
)
set(
DEFAULT_OUTPUT_DIRECTORY_PATH
"e:/nxdk_pgraph_tests"
CACHE STRING
"Absolute XBOX-path to a directory into which test output will be written."
)
option(
SKIP_TESTS_BY_DEFAULT
"Causes all tests whose names do not appear in the runtime config to be skipped when automatically executing tests."
OFF
)
if (IS_TARGET_BUILD)
add_subdirectory(src)
else ()
enable_testing()
add_subdirectory(tests/host)
endif ()
find_package(Doxygen)
if(DOXYGEN_FOUND)
add_custom_target(
doc
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Generating Doxygen documentation"
)
endif (DOXYGEN_FOUND)