Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset CMakeLists.txt to correct revision and include updates from thi… #431

Open
wants to merge 2 commits into
base: amd-staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,25 @@ set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT")

# Dependencies
# Python Dependencies pointing to requirements.txt file
set(REQUIREMNTS_FILE "${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt")
set(PACKAGE_REQUIRES
"rocprofiler"
CACHE STRING "Package dependencies")

if(EXISTS ${REQUIREMNTS_FILE})
file(READ ${REQUIREMNTS_FILE} REQUIREMENTS_CONTENT)
# replace newlines with commas
STRING(REPLACE "\n" "," REQUIREMENTS_LIST ${REQUIREMENTS_CONTENT})
# remove trailing commas
STRING(REGEX REPLACE ", $|,$" "" REQUIREMENTS_LIST ${REQUIREMENTS_LIST})
# append to PACKAGE_REQUIRES
set(PACKAGE_REQUIRES
"${PACKAGE_REQUIRES},
${REQUIREMENTS_LIST}"
CACHE STRING "Updated PACKAGE_REQUIRES to include requirements.txt" FORCE)
endif()

set(CPACK_RPM_PACKAGE_REQUIRES ${PACKAGE_REQUIRES})
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${PACKAGE_REQUIRES})

Expand Down
Loading