Skip to content

Commit 5b12668

Browse files
committed
Add source code for RMV 1.5 release.
1 parent f156e31 commit 5b12668

File tree

83 files changed

+1221
-1623
lines changed

Some content is hidden

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

83 files changed

+1221
-1623
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ __pycache__/
55
build/linux
66
build/mac
77
build/win
8+
cmake-build*/
9+
.idea/
810
documentation/build
911
documentation/source/_build
12+
source/frontend/util/version.h
13+
Buildinfo.properties
1014
external
1115
.vscode
1216
*.aps

Buildinfo.properties.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUILD_NUMBER=@RMV_BUILD_NUMBER@
2+
VERSION_NUMBER=@RMV_MAJOR_VERSION@.@RMV_MINOR_VERSION@

CMakeLists.txt

Lines changed: 67 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ cmake_minimum_required(VERSION 3.11)
33
## Specify the top level name of the project - this will define the solution name for Visual Studio
44
project(RMV)
55

6+
# Define version information
7+
set(RMV_MAJOR_VERSION 1)
8+
set(RMV_MINOR_VERSION 5)
9+
if (NOT RMV_BUGFIX_NUMBER)
10+
set(RMV_BUGFIX_NUMBER 0)
11+
endif ()
12+
if (NOT RMV_BUILD_NUMBER)
13+
set(RMV_BUILD_NUMBER 0)
14+
endif ()
15+
string(TIMESTAMP DATE "\"%m/%d/%Y\"")
16+
string(TIMESTAMP YEAR "%Y")
17+
string(TIMESTAMP YEAR_STRING "\"%Y\"")
18+
19+
configure_file("${CMAKE_SOURCE_DIR}/Buildinfo.properties.in" "${CMAKE_SOURCE_DIR}/Buildinfo.properties")
20+
configure_file("${CMAKE_SOURCE_DIR}/source/frontend/util/version.h.in" "${CMAKE_SOURCE_DIR}/source/frontend/util/version.h")
21+
622
## For RMV we only care about the Debug and Release configuration types
723
set(CMAKE_CONFIGURATION_TYPES Debug Release)
824

@@ -18,11 +34,11 @@ set (CMAKE_DEBUG_POSTFIX -d${ADT_INTERNAL_POSTFIX})
1834
set (CMAKE_RELEASE_POSTFIX ${ADT_INTERNAL_POSTFIX})
1935

2036
IF(WIN32)
21-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../release${ADT_INTERNAL_POSTFIX})
22-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../debug${ADT_INTERNAL_POSTFIX})
37+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../release${ADT_INTERNAL_POSTFIX_LOWER})
38+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../debug${ADT_INTERNAL_POSTFIX_LOWER})
2339
ELSE(WIN32)
24-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../release${ADT_INTERNAL_POSTFIX})
25-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../debug${ADT_INTERNAL_POSTFIX})
40+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/../../release${ADT_INTERNAL_POSTFIX_LOWER})
41+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/../../debug${ADT_INTERNAL_POSTFIX_LOWER})
2642
ENDIF(WIN32)
2743

2844
# Add for CentOS compiler warning
@@ -33,20 +49,12 @@ include_directories("${PROJECT_SOURCE_DIR}/external/")
3349

3450
# Global compiler options
3551
IF(WIN32)
36-
add_compile_options(/W4 /WX /MP)
37-
# disable warning C4201: nonstandard extension used: nameless struct/union
38-
add_compile_options(/wd4201)
39-
# this warning is caused by the QT header files - use pragma to disable at source
40-
# disable warning C4127: conditional expression is constant
41-
add_compile_options(/wd4127)
42-
# this warning is caused by QT header files and has been introduced by VS2019 16.9.6
43-
# disable warning C5240: 'nodiscard': attribute is ignored in this syntactic position
44-
add_compile_options(/wd5240)
52+
add_compile_options(/MP)
4553
# bump the stack size
4654
add_link_options(/STACK:16777216)
4755
ELSEIF(UNIX)
4856
# Use -Wno-missing-field-initializers for CentOS compiler warning
49-
add_compile_options(-std=c++11 -D_LINUX -Wall -Wextra -Werror -Wno-missing-field-initializers)
57+
add_compile_options(-D_LINUX -Wall -Wextra -Wno-missing-field-initializers)
5058
# Allow executable to be double clicked.
5159
add_link_options(-no-pie)
5260
# Use _DEBUG on Unix for Debug Builds (defined automatically on Windows)
@@ -113,18 +121,17 @@ ENDIF(WIN32)
113121
# This is evaluated at project build time - not at CMake generation time
114122
set(BUILD_ROOT $<$<CONFIG:debug>:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}>$<$<CONFIG:release>:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}>)
115123

116-
# Define the option to pass to the sphinx documentation job
117-
set(SPHINX_OPTION public)
118-
119-
find_program(SPHINX_EXECUTABLE sphinx-build)
120-
if(NOT SPHINX_EXECUTABLE)
121-
message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!")
124+
if(APPLE)
125+
set(DOCS_OUTPUT_DIR $<TARGET_FILE_DIR:RadeonMemoryVisualizer>/../Resources)
126+
else()
127+
set(DOCS_OUTPUT_DIR ${BUILD_ROOT})
122128
endif()
123129

124130
# group sphinx source files into a sphinx folder
125131
file(GLOB SPHINX_DOC_FILES ${SPHINX_DOC_FILES} ${CMAKE_SOURCE_DIR}/documentation/source/*.rst)
126132
set (SPHINX_DOC_MAIN ${CMAKE_SOURCE_DIR}/documentation/source/conf.py)
127-
source_group("sphinx" FILES ${SPHINX_DOC_FILES} ${SPHINX_DOC_MAIN})
133+
set (ALL_SPHINX_FILES ${SPHINX_DOC_FILES} ${SPHINX_DOC_MAIN})
134+
source_group("sphinx" FILES ${ALL_SPHINX_FILES})
128135

129136
# group release documents into a release_docs folder
130137
set (RELEASE_DOCS_IN_ROOT
@@ -136,34 +143,47 @@ set (RELEASE_DOCS_IN_ROOT
136143
set (RELEASE_DOCS ${RELEASE_DOCS_IN_ROOT})
137144
source_group("release_docs" FILES ${RELEASE_DOCS})
138145

139-
# hang the sphinx build on the conf.py file and specify a dummy output ("sphinx_output")
140-
# this ensures the sphinx docs are built everytime you ask to build the Documentation target
141-
# Sphinx has proper dependency checking, so this works as expected.
142-
# Once built, clean up any unneeded files.
143-
add_custom_target(Documentation SOURCES ${SPHINX_DOC_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output)
144-
add_custom_command(MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
145-
COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
146-
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${BUILD_ROOT}/docs/help/rmv/html/. -t ${SPHINX_OPTION}
147-
COMMAND ${CMAKE_COMMAND} -E remove_directory ${BUILD_ROOT}/docs/help/rmv/html/.doctrees
148-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/allocation_explorer.html
149-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/allocation_overview.html
150-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/capture.html
151-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/carousel.html
152-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/heap_overview.html
153-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/memory_leak_finder.html
154-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/resource_details.html
155-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/resource_list.html
156-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/resource_overview.html
157-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/settings.html
158-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/snapshot_delta.html
159-
COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_ROOT}/docs/help/rmv/html/timeline.html
160-
)
146+
find_program(SPHINX_EXECUTABLE sphinx-build)
147+
if(SPHINX_EXECUTABLE)
148+
# Define the option to pass to the sphinx documentation job
149+
set(SPHINX_OPTION public)
150+
151+
# hang the sphinx build on the conf.py file and specify a dummy output ("sphinx_output")
152+
# this ensures the sphinx docs are built everytime you ask to build the Documentation target
153+
# Sphinx has proper dependency checking, so this works as expected.
154+
# Once built, clean up any unneeded files.
155+
add_custom_target(Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS} DEPENDS sphinx_output)
156+
if(APPLE)
157+
add_dependencies(Documentation RadeonMemoryVisualizer)
158+
endif()
159+
add_custom_command(MAIN_DEPENDENCY ${SPHINX_DOC_MAIN} OUTPUT sphinx_output
160+
COMMAND ${CMAKE_COMMAND} -E echo "building Sphinx documentation"
161+
COMMAND ${SPHINX_EXECUTABLE} ${CMAKE_SOURCE_DIR}/documentation/source ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/. -t ${SPHINX_OPTION}
162+
COMMAND ${CMAKE_COMMAND} -E remove_directory ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/.doctrees
163+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/allocation_explorer.html
164+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/allocation_overview.html
165+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/capture.html
166+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/carousel.html
167+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/heap_overview.html
168+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/memory_leak_finder.html
169+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/resource_details.html
170+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/resource_list.html
171+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/resource_overview.html
172+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/settings.html
173+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/snapshot_delta.html
174+
COMMAND ${CMAKE_COMMAND} -E remove ${DOCS_OUTPUT_DIR}/docs/help/rmv/html/timeline.html
175+
)
176+
else()
177+
message(WARNING "SPHINX_EXECUTABLE (sphinx-build) is not found! Documentation will not be built!")
178+
# If the sphinx binary isn't found, then just create the Documentation project with only the release docs in it.
179+
add_custom_target(Documentation ALL SOURCES ${ALL_SPHINX_FILES} ${RELEASE_DOCS})
180+
endif()
161181

162182
add_custom_command(TARGET Documentation POST_BUILD
163183
COMMAND ${CMAKE_COMMAND} -E echo "copying Documentation to output directory"
164-
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_ROOT}/docs
165-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${BUILD_ROOT}/.
184+
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/docs
185+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RELEASE_DOCS_IN_ROOT} ${DOCS_OUTPUT_DIR}/.
166186
COMMAND ${CMAKE_COMMAND} -E echo "copying Samples to output directory"
167-
COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILD_ROOT}/samples
168-
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/sampleTrace.rmv ${BUILD_ROOT}/samples/sample_trace.rmv
187+
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOCS_OUTPUT_DIR}/samples
188+
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/samples/sampleTrace.rmv ${DOCS_OUTPUT_DIR}/samples/sample_trace.rmv
169189
)

build/fetch_dependencies.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
#
44
# Script to fetch all external git and/or downloadable dependencies needed to build the project
55
#
6-
# fetch_dependencies.py (--internal)
7-
#
8-
# If --internal is specified, then any additional dependencies required for internal builds will also
9-
# be checked out.
6+
# fetch_dependencies.py
107
#
118
# Each git repo will be updated to the commit specified in the "gitMapping" table.
129

@@ -94,7 +91,7 @@ def update_git_dependencies(git_mapping, update):
9491
return True
9592

9693
# Main body of update functionality
97-
def do_fetch_dependencies(update, internal):
94+
def do_fetch_dependencies(update):
9895
# Print git version being used
9996
git_cmd = ["git", "--version"]
10097
git_output = subprocess.check_output(git_cmd, stderr=subprocess.STDOUT)
@@ -111,7 +108,6 @@ def do_fetch_dependencies(update, internal):
111108

112109
# parse the command line arguments
113110
parser = argparse.ArgumentParser(description="A script that fetches all the necessary build dependencies for the project")
114-
parser.add_argument("--internal", action="store_true", help="fetch dependencies required for internal builds of the tool (only used within AMD")
115111
args = parser.parse_args()
116112

117-
do_fetch_dependencies(True, args.internal)
113+
do_fetch_dependencies(True)

0 commit comments

Comments
 (0)