Skip to content

Commit f456711

Browse files
committed
Update source code for RMV v1.7 release
1 parent aa0beda commit f456711

File tree

61 files changed

+1358
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1358
-409
lines changed

CMakeLists.txt

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(RMV)
77

88
# Define version information
99
set(RMV_MAJOR_VERSION 1)
10-
set(RMV_MINOR_VERSION 6)
10+
set(RMV_MINOR_VERSION 7)
1111
if (NOT RMV_BUGFIX_NUMBER)
1212
set(RMV_BUGFIX_NUMBER 0)
1313
endif ()
@@ -21,6 +21,11 @@ string(TIMESTAMP YEAR_STRING "\"%Y\"")
2121
configure_file("${CMAKE_SOURCE_DIR}/Buildinfo.properties.in" "${CMAKE_SOURCE_DIR}/Buildinfo.properties")
2222
configure_file("${CMAKE_SOURCE_DIR}/source/frontend/util/version.h.in" "${CMAKE_SOURCE_DIR}/source/frontend/util/version.h")
2323

24+
# Add cmake utilities
25+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
26+
include(devtools_qt_helper)
27+
include(dev_tools)
28+
2429
option(RDF_ENABLE_CXX_BINDINGS "Allow usage of C++ interface for RDF library" ON)
2530
option(RDF_STATIC "Build RDF as a static library" ON)
2631

@@ -38,6 +43,9 @@ ENDIF()
3843
set (CMAKE_DEBUG_POSTFIX -d)
3944
set (CMAKE_RELEASE_POSTFIX)
4045

46+
# Add cmake utilities
47+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
48+
4149
IF(WIN32)
4250
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../release)
4351
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../debug)
@@ -49,8 +57,8 @@ ENDIF(WIN32)
4957
# Add for CentOS compiler warning
5058
add_definitions(-DJSON_SKIP_UNSUPPORTED_COMPILER_CHECK)
5159

52-
include_directories("${PROJECT_SOURCE_DIR}/external/qt_common/")
5360
include_directories("${PROJECT_SOURCE_DIR}/external/")
61+
include_directories("${PROJECT_SOURCE_DIR}/external/qt_common/")
5462
include_directories("${PROJECT_SOURCE_DIR}/external/third_party/")
5563

5664
# Global compiler options
@@ -96,8 +104,7 @@ ENDMACRO(SOURCE_GROUP_BY_FOLDER)
96104
# Define C++ standard for RMV
97105
set(CMAKE_CXX_STANDARD 17)
98106

99-
add_subdirectory(external/qt_common/custom_widgets QtCommon/custom_widgets)
100-
add_subdirectory(external/qt_common/utils QtCommon/utils)
107+
add_subdirectory(external/qt_common qt_common)
101108
add_subdirectory(external/rdf/imported/zstd)
102109
add_subdirectory(external/rdf/rdf)
103110
add_subdirectory(external/system_info_utils)
@@ -148,9 +155,9 @@ source_group("sphinx" FILES ${ALL_SPHINX_FILES})
148155
# group release documents into a release_docs folder
149156
set (RELEASE_DOCS_IN_ROOT
150157
${CMAKE_SOURCE_DIR}/README.md
151-
${CMAKE_SOURCE_DIR}/Release_Notes.txt
158+
${CMAKE_SOURCE_DIR}/RELEASE_NOTES.txt
152159
${CMAKE_SOURCE_DIR}/NOTICES.txt
153-
${CMAKE_SOURCE_DIR}/License.txt
160+
${CMAKE_SOURCE_DIR}/LICENSE.txt
154161
)
155162
set (RELEASE_DOCS ${RELEASE_DOCS_IN_ROOT})
156163
source_group("release_docs" FILES ${RELEASE_DOCS})
@@ -170,20 +177,20 @@ if(SPHINX_EXECUTABLE)
170177
endif()
171178
add_custom_command(MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
172179
COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
173-
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/. -t ${SPHINX_OPTION}
174-
COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/.doctrees
175-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/allocation_explorer.html
176-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/allocation_overview.html
177-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/capture.html
178-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/carousel.html
179-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/heap_overview.html
180-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/memory_leak_finder.html
181-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/resource_details.html
182-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/resource_list.html
183-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/resource_overview.html
184-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/settings.html
185-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/snapshot_delta.html
186-
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/timeline.html
180+
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${DOCS_OUTPUT_DIR}/help/rmv/. -t ${SPHINX_OPTION}
181+
COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR}/help/rmv/.doctrees
182+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/allocation_explorer.html
183+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/allocation_overview.html
184+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/capture.html
185+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/carousel.html
186+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/heap_overview.html
187+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/memory_leak_finder.html
188+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/resource_details.html
189+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/resource_list.html
190+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/resource_overview.html
191+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/settings.html
192+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/snapshot_delta.html
193+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/help/rmv/timeline.html
187194
)
188195
else()
189196
message(WARNING "SPHINX_EXECUTABLE (sphinx-build) is not found! Documentation will not be built!")
@@ -193,7 +200,6 @@ endif()
193200

194201
add_custom_command(TARGET Documentation POST_BUILD
195202
COMMAND ${CMAKE_COMMAND} -E echo "copying Documentation to output directory"
196-
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/docs
197203
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${DOCS_OUTPUT_DIR}/.
198204
COMMAND ${CMAKE_COMMAND} -E echo "copying Samples to output directory"
199205
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/samples

build/dependency_map.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#! python3
2-
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
2+
##=============================================================================
3+
## Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief List of all external dependencies.
7+
##=============================================================================
38

49
import sys
510

@@ -16,7 +21,7 @@
1621
# Define a set of dependencies that exist as separate git projects.
1722
# each git dependency has a desired directory where it will be cloned - along with a commit to checkout
1823
git_mapping = {
19-
github_tools + "QtCommon" : ["../external/qt_common", "v3.8.0"],
24+
github_tools + "QtCommon" : ["../external/qt_common", "v3.12.0"],
2025
github_tools + "UpdateCheckApi" : ["../external/update_check_api", "v2.0.1"],
2126
github_tools + "system_info_utils" : ["../external/system_info_utils", "88a338a01949f8d8bad60a30b78b65300fd13a9f"],
2227
github_root + "GPUOpen-Drivers/libamdrdf" : ["../external/rdf", "v1.1.2"],

build/fetch_dependencies.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#! python3
2-
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
3-
#
4-
# Script to fetch all external git and/or downloadable dependencies needed to build the project
5-
#
6-
# fetch_dependencies.py
7-
#
8-
# Each git repo will be updated to the commit specified in the "gitMapping" table.
2+
##=============================================================================
3+
## Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief Script to fetch all external git and/or downloadable dependencies
7+
## needed to build the project.
8+
##
9+
## Each git repo will be updated to the commit specified in the "gitMapping" table.
10+
##=============================================================================
911

1012
import os
1113
import subprocess

build/pre_build.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#! python3
2-
# Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
3-
#
4-
# Script to perform all necessary pre build steps. This includes:
5-
#
6-
# - Fetching all dependencies
7-
# - Creating output directories
8-
# - Calling CMake with appropriate parameters to generate the build files
9-
#
2+
##=============================================================================
3+
## Copyright (c) 2020-2023 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief Script to perform all necessary pre build steps. This includes:
7+
##
8+
## - Fetching all dependencies
9+
## - Creating output directories
10+
## - Calling CMake with appropriate parameters to generate the build files
11+
##=============================================================================
12+
1013
import os
1114
import sys
1215
import importlib.util
@@ -59,6 +62,8 @@
5962
parser.add_argument("--qt-root", default="~/Qt", help="specify the root directory for locating QT on this system (default: ~/Qt) ")
6063
else:
6164
parser.add_argument("--qt-root", default="~/Qt", help="specify the root directory for locating QT on this system (default: ~/Qt) ")
65+
parser.add_argument("--disable-extra-qt-lib-deploy", action="store_true", help="prevent extra Qt library files (XCB and ICU libs) from being copied during post build step")
66+
parser.add_argument("--qt-system", action="store_true", help="use the system-installed version of QT")
6267
parser.add_argument("--qt", default="5.15.2", help="specify the version of QT to be used with the script (default: 5.15.2)" )
6368
parser.add_argument("--clean", action="store_true", help="delete any directories created by this script")
6469
parser.add_argument("--no-qt", action="store_true", help="build a headless version (not applicable for all products)")
@@ -69,7 +74,6 @@
6974
parser.add_argument("--build-jobs", default="4", help="number of simultaneous jobs to run during a build (default = 4)")
7075
parser.add_argument("--analyze", action="store_true", help="perform static analysis of code on build (currently VS2017 only)")
7176
parser.add_argument("--vscode", action="store_true", help="generate CMake options into VsCode settings file for this project")
72-
parser.add_argument("--disable-extra-qt-lib-deploy", action="store_true", help="prevent extra Qt library files (XCB and ICU libs) from being copied during post build step")
7377
if support_32_bit_build:
7478
parser.add_argument("--platform", default="x64", choices=["x64", "x86"], help="specify the platform (32 or 64 bit)")
7579
args = parser.parse_args()
@@ -259,6 +263,8 @@ def generate_config(config):
259263
if sys.platform.startswith('linux'):
260264
if args.disable_extra_qt_lib_deploy:
261265
cmake_args.extend(["-DDISABLE_EXTRA_QT_LIB_DEPLOY:BOOL=TRUE"])
266+
if args.qt_system:
267+
cmake_args.extend(["-DQT_SYSTEM:BOOL=TRUE"])
262268

263269
cmake_args.extend(["-DRMV_BUILD_NUMBER=" + str(args.build_number)])
264270

@@ -355,8 +361,6 @@ def generate_config(config):
355361
# For Visual Studio, specify the config to build
356362
cmake_args = ["cmake", "--build", build_dir, "--config", config, "--target", "ALL_BUILD", "--", "/m:" + args.build_jobs]
357363
if args.analyze:
358-
# cmake_args.append("/p:CodeAnalysisTreatWarningsAsErrors=true")
359-
# cmake_args.append("/p:CodeAnalysisRuleSet=NativeRecommendedRules.ruleset")
360364
cmake_args.append("/p:CodeAnalysisRuleSet=NativeMinimumRules.ruleset")
361365
cmake_args.append("/p:RunCodeAnalysis=true")
362366

cmake/dev_tools.cmake

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#######################################################################################################################
2+
### Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All rights reserved.
3+
### \author AMD Developer Tools Team
4+
#######################################################################################################################
5+
6+
cmake_minimum_required(VERSION 3.10)
7+
8+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
9+
string(REPLACE " /W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
10+
endif ()
11+
12+
# Apply options to a developer tools target.
13+
# These options are hard requirements to build. If they cannot be applied, we
14+
# will need to fix the offending target to ensure it complies.
15+
function(devtools_target_options name)
16+
17+
set_target_properties(${name} PROPERTIES
18+
CXX_STANDARD 17
19+
CXX_STANDARD_REQUIRED ON)
20+
21+
get_target_property(target_type ${name} TYPE)
22+
if (${target_type} STREQUAL "INTERFACE_LIBRARY")
23+
return()
24+
endif ()
25+
26+
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
27+
28+
target_compile_options(${name}
29+
PRIVATE
30+
-Wall
31+
-Werror
32+
-Wextra
33+
-Wno-deprecated-declarations
34+
-Wno-unused-variable
35+
-Wno-missing-field-initializers
36+
-Wno-unknown-pragmas
37+
)
38+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
39+
target_compile_options(${name}
40+
PRIVATE
41+
/W4
42+
/WX
43+
/MP
44+
45+
# disable warning C4201: nonstandard extension used: nameless struct/union
46+
/wd4201
47+
48+
# TODO this warning is caused by the QT header files - use pragma to disable at source
49+
# disable warning C4127: conditional expression is constant
50+
/wd4127
51+
52+
# Disable warnings about deprecated features
53+
# This happens when using later versions of Qt than RDP defaults to.
54+
/wd4996
55+
)
56+
else ()
57+
58+
message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} is not supported!")
59+
60+
endif ()
61+
62+
# GNU specific flags
63+
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
64+
target_compile_options(${name} PRIVATE -Wno-maybe-uninitialized)
65+
endif ()
66+
67+
if (UNIX AND NOT APPLE)
68+
target_compile_definitions(${name}
69+
PRIVATE
70+
_LINUX
71+
72+
# Use _DEBUG on Unix for Debug Builds (defined automatically on Windows)
73+
$<$<CONFIG:Debug>:_DEBUG>
74+
)
75+
endif ()
76+
77+
endfunction()

0 commit comments

Comments
 (0)