forked from UltraOS/uACPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (45 loc) · 1.17 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
cmake_minimum_required(VERSION 3.16)
project(TestRunner C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../uacpi.cmake)
foreach(CONF_TYPE ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${CONF_TYPE} CONF_TYPE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONF_TYPE} ${CMAKE_BINARY_DIR})
endforeach(CONF_TYPE ${CMAKE_CONFIGURATION_TYPES})
add_executable(
test-runner
test_runner.cpp
helpers.cpp
interface_impl.cpp
resource_tests.cpp
${UACPI_SOURCES}
)
target_include_directories(
test-runner
PRIVATE
${UACPI_INCLUDES}
)
if (MSVC)
# Address sanitizer on MSVC depends on a dynamic library that is not present in
# PATH by default. Lets just not enable it here.
target_compile_options(
test-runner
PRIVATE
/W3 /WX
/wd4200 /wd4267 /wd4244
)
else ()
target_compile_options(
test-runner
PRIVATE
-fsanitize=address,undefined -g3 -Wall -Wextra -Werror
)
target_link_options(
test-runner
PRIVATE
-fsanitize=address,undefined -g3
)
endif ()