-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
65 lines (52 loc) · 1.81 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
# gputool project cmake file
#
# Copyright (C) 2017 Andres Rodriguez
#
# This file is part of gputool.
#
# Foobar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# Foobar is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.0.0)
project(gputool)
# Version number
set (GPUTOOL_VERSION_MAJOR 0)
set (GPUTOOL_VERSION_MINOR 2)
set (GPUTOOL_VERSION_PATCH 0)
set (AUTOGEN_HEADERS_DIR "${PROJECT_BINARY_DIR}/autogen/include")
# Include <gputool/config.h>
configure_file (
"${PROJECT_SOURCE_DIR}/config.h.in"
"${AUTOGEN_HEADERS_DIR}/gputool/config.h"
)
include_directories("${AUTOGEN_HEADERS_DIR}")
include_directories(
"include/"
"amdregdb/include"
)
include(cmake/comp_base.cmake)
add_subdirectory(amdregdb)
add_subdirectory(src)
comp_target_features(amdregdb PUBLIC cpp17_lib/uncaught_exceptions)
comp_target_features(gputool PUBLIC cpp17_lib/uncaught_exceptions)
set (SRC_EXTENSIONS cpp h)
set (SRC_DIRS src/ include/)
# make cppcheck will run some basic static analysis
set (CPPCHECK_EXTENSIONS ${SRC_EXTENSIONS})
set (CPPCHECK_DIR ${SRC_DIRS})
include(cmake/cppcheck.cmake)
# make format fixes the formatting in-place
set (CLANG_FORMAT_EXTENSIONS ${SRC_EXTENSIONS})
set (CLANG_FORMAT_DIR ${SRC_DIRS})
include(cmake/clang-format.cmake)
# make genregs generates registers headers
include(cmake/genregs.cmake)