Use gersemi for CMake formatting (#257)
* Replace `cmake-format` with `gersemi`
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
* Remove .cmake-format.yaml
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
* Update workflow to use gersemi
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
* Update CONTRIBUTING.md
* Update helper scripts
* Don't include `*/external/*` in workflows
---------
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
[ROCm/rocprofiler-systems commit: 122623a929]
This commit is contained in:
committad av
GitHub
förälder
0403aaa97f
incheckning
8fcf3a50b0
@@ -25,8 +25,13 @@ cmake_minimum_required(VERSION 3.18.4)
|
||||
if(NOT DEFINED ROCPROFSYS_VERSION)
|
||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/../VERSION" FULL_VERSION_STRING LIMIT_COUNT 1)
|
||||
string(REGEX REPLACE "(\n|\r)" "" FULL_VERSION_STRING "${FULL_VERSION_STRING}")
|
||||
string(REGEX REPLACE "([0-9]+)\.([0-9]+)\.([0-9]+)(.*)" "\\1.\\2.\\3"
|
||||
ROCPROFSYS_VERSION "${FULL_VERSION_STRING}")
|
||||
string(
|
||||
REGEX REPLACE
|
||||
"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"
|
||||
"\\1.\\2.\\3"
|
||||
ROCPROFSYS_VERSION
|
||||
"${FULL_VERSION_STRING}"
|
||||
)
|
||||
endif()
|
||||
|
||||
find_package(Git)
|
||||
@@ -37,20 +42,22 @@ if(Git_FOUND AND EXISTS ".git")
|
||||
OUTPUT_VARIABLE ROCPROFSYS_GIT_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULT_VARIABLE _GIT_DESCRIBE_RESULT
|
||||
ERROR_QUIET)
|
||||
ERROR_QUIET
|
||||
)
|
||||
if(NOT _GIT_DESCRIBE_RESULT EQUAL 0)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe
|
||||
OUTPUT_VARIABLE ROCPROFSYS_GIT_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
RESULT_VARIABLE _GIT_DESCRIBE_RESULT
|
||||
ERROR_QUIET)
|
||||
ERROR_QUIET
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
"Git not found or .git directory not found; using version ${ROCPROFSYS_VERSION}"
|
||||
)
|
||||
"Git not found or .git directory not found; using version ${ROCPROFSYS_VERSION}"
|
||||
)
|
||||
set(GIT_DESCRIBE "v${ROCPROFSYS_VERSION}")
|
||||
endif()
|
||||
|
||||
@@ -62,5 +69,8 @@ message(STATUS "Writing ${OUTPUT_DIR}/rocprofiler-systems-install.py.")
|
||||
message(STATUS "rocprofiler-systems version: ${ROCPROFSYS_VERSION}.")
|
||||
message(STATUS "rocprofiler-systems git describe: ${ROCPROFSYS_GIT_TAG}")
|
||||
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/../cmake/Templates/rocprof-sys-install.py.in
|
||||
${OUTPUT_DIR}/rocprofiler-systems-install.py @ONLY)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_LIST_DIR}/../cmake/Templates/rocprof-sys-install.py.in
|
||||
${OUTPUT_DIR}/rocprofiler-systems-install.py
|
||||
@ONLY
|
||||
)
|
||||
|
||||
Referens i nytt ärende
Block a user