-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
44 lines (39 loc) · 1.05 KB
/
CMakeLists.txt
File metadata and controls
44 lines (39 loc) · 1.05 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
## Copyright (C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. ##
cmake_minimum_required(VERSION 3.25)
project(DEVICE_INFO LANGUAGES CXX)
add_library(device_info STATIC)
add_library(AMD::device_info ALIAS device_info)
target_sources(device_info
PRIVATE
DeviceInfo.cpp
DeviceInfoUtils.cpp
PUBLIC
FILE_SET public_headers
TYPE "HEADERS"
BASE_DIRS .
FILES
DeviceInfo.h
DeviceInfoUtils.h
)
target_compile_features(device_info PUBLIC cxx_std_20)
if (MSVC)
target_compile_options(device_info PRIVATE
# Reasonable warning level
/W4
# Compiler warnings as errors
/WX
)
else(${CMAKE_CXX_COMPILER_ID} MATCHES "(GNU|Clang)")
target_compile_options(device_info PRIVATE
-Wall
-Wextra
-Werror
)
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
target_compile_options(device_info PRIVATE
-Wconversion
-Wimplicit-fallthrough
-Wstring-conversion
)
endif()
endif()