2e0ede4761
* [0/N] git submodules
* [1/N] Update cmake, gitignore, external
- clang-tidy file
- update .gitignore
- update main CMakeLists.txt
- update external/CMakeLists.txt
- update rocprofiler_config_interfaces.cmake
- update rocprofiler_formatting.cmake
- update rocprofiler_interfaces.cmake
- update rocprofiler_linting.cmake
- update rocprofiler_options.cmake
- update rocprofiler_utilities.cmake
* [2/N] Update rocprofiler/config.h
- update to work with new rocprofiler.h
* [3/N] Update source/lib/rocprofiler/hsa
- hsa-types.h: static asserts
- hsa.cpp: copyTables scope
- hsa.gen.cpp: ACTIVITY_DOMAIN_HSA_API -> ROCPROFILER_TRACER_ACTIVITY_DOMAIN_HSA_API
- rename some files
- add rocprofiler_ prefix to types and enums
- HSA_API_TABLE_LOOKUP_DEFINITION macro
- get_saved_table() -> get_table()
* [4/N] Update source/lib/common
- CMake: change target_link_libraries
- defines.hpp: remove ppdefs defined in include/rocprofiler/defines.h
* [5/N] Update source/lib/rocprofiler
- updates due to changes in rocprofiler.h
- rocprofiler_config.cpp: remove unions which are now defined in include/rocprofiler
- CMakeLists.txt: rocprofiler.cpp and public hsa-runtime and hip libraries
- rocprofiler.cpp: dummy implementations for:
- rocprofiler_query_available_agents
- rocprofiler_create_context
- rocprofiler_start_context
- rocprofiler_stop_context
- rocprofiler_flush_buffer
- rocprofiler_destroy_buffer
* [6/N] Update license
- replace stale LBNL license
* [7/N] CMake format
[ROCm/rocprofiler-sdk commit: 351d825a8d]
49 строки
1.7 KiB
CMake
49 строки
1.7 KiB
CMake
include_guard(GLOBAL)
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# Clang Tidy
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
find_program(
|
|
ROCPROFILER_CLANG_TIDY_COMMAND
|
|
NAMES clang-tidy-18
|
|
clang-tidy-17
|
|
clang-tidy-16
|
|
clang-tidy-15
|
|
clang-tidy-14
|
|
clang-tidy-13
|
|
clang-tidy-12
|
|
clang-tidy-11
|
|
clang-tidy)
|
|
|
|
macro(ROCPROFILER_ACTIVATE_CLANG_TIDY)
|
|
if(ROCPROFILER_ENABLE_CLANG_TIDY)
|
|
if(NOT ROCPROFILER_CLANG_TIDY_COMMAND)
|
|
message(
|
|
FATAL_ERROR
|
|
"ROCPROFILER_ENABLE_CLANG_TIDY is ON but clang-tidy is not found!")
|
|
endif()
|
|
|
|
set(CMAKE_CXX_CLANG_TIDY
|
|
${ROCPROFILER_CLANG_TIDY_COMMAND}
|
|
-header-filter=${PROJECT_SOURCE_DIR}/source/.*
|
|
--warnings-as-errors=*,-misc-header-include-cycle)
|
|
|
|
# Create a preprocessor definition that depends on .clang-tidy content so the
|
|
# compile command will change when .clang-tidy changes. This ensures that a
|
|
# subsequent build re-runs clang-tidy on all sources even if they do not otherwise
|
|
# need to be recompiled. Nothing actually uses this definition. We add it to
|
|
# targets on which we run clang-tidy just to get the build dependency on the
|
|
# .clang-tidy file.
|
|
file(SHA1 ${PROJECT_SOURCE_DIR}/.clang-tidy clang_tidy_sha1)
|
|
set(CLANG_TIDY_DEFINITIONS "CLANG_TIDY_SHA1=${clang_tidy_sha1}")
|
|
unset(clang_tidy_sha1)
|
|
endif()
|
|
endmacro()
|
|
|
|
macro(ROCPROFILER_DEACTIVATE_CLANG_TIDY)
|
|
set(CMAKE_CXX_CLANG_TIDY)
|
|
endmacro()
|