Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .cmakelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CMake lint file for hipFile
# https://cmake-format.readthedocs.io/en/latest/cmake-lint.html
filter=-linelength
2 changes: 1 addition & 1 deletion cmake/AISCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
include(AISClangCompilerOptions)
include(AISGNUCompilerOptions)

function (ais_set_compiler_flags target)
function(ais_set_compiler_flags target)
get_target_property(sources ${target} SOURCES)
foreach(source IN LISTS sources)
get_source_file_property(language ${source} LANGUAGE)
Expand Down
2 changes: 1 addition & 1 deletion cmake/AISGNUCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
function(get_ais_gnu_warning_flags outvar compiler_version)

# Warning flags for g++ 9 and earlier
set(flags
set(flags
# Basic "high" warning levels
-Wall
-Wextra
Expand Down
2 changes: 1 addition & 1 deletion cmake/AISInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if(BUILD_ROCFILE OR BUILD_HIPFILE)
)
endif()
if(BUILD_HIPFILE)
rocm_install(
rocm_install(
DIRECTORY ${CMAKE_SOURCE_DIR}/hipfile/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
Expand Down
2 changes: 1 addition & 1 deletion cmake/AISSanitizers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(AIS_BUILD_THREAD_SANITIZERS)
message(WARNING "TSAN has known problems with higher levels of entropy, try using `sudo sysctl vm.mmap_rnd_bits=28` if you encounter errors concerning unexpected memory mappings.")
endif()

function (ais_add_sanitizers target)
function(ais_add_sanitizers target)
if(AIS_BUILD_SANITIZERS AND AIS_BUILD_THREAD_SANITIZERS)
message(FATAL_ERROR "AIS_BUILD_SANITIZERS is not compatible with AIS_BUILD_THREAD_SANITIZERS")
endif()
Expand Down
4 changes: 2 additions & 2 deletions cmake/AISSetCoverageFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
#
# SPDX-License-Identifier: MIT

function (ais_set_coverage_file test_list_name directory)
function(ais_set_coverage_file test_list_name directory)
set(test_counter 0)
set(test_list "${${test_list_name}}")
foreach(test IN LISTS test_list)
set_tests_properties(
${test}
PROPERTIES ENVIRONMENT_MODIFICATION "LLVM_PROFILE_FILE=set:${directory}/${test_list_name}.${test_counter}.profraw")
MATH(EXPR test_counter "${test_counter}+1")
math(EXPR test_counter "${test_counter}+1")
endforeach()
endfunction()
6 changes: 5 additions & 1 deletion cmake/AISUseGTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: MIT

include(FetchContent)

# lint_cmake: -readability/wonkycase
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/releases/download/v1.17.0/googletest-1.17.0.tar.gz
Expand All @@ -13,7 +15,9 @@ FetchContent_Declare(

set(INSTALL_GTEST OFF CACHE BOOL "Don't install gtest.")
set(GTEST_HAS_ABSL OFF CACHE BOOL "Don't use abseil for GTest.")

FetchContent_MakeAvailable(googletest)
# lint_cmake: +readability/wonkycase

if(rocm-cmake_SOURCE_DIR)
message(STATUS "Using fetched googletest.")
Expand All @@ -23,7 +27,7 @@ endif()

include(GoogleTest)

function (ais_gtest_discover_tests target)
function(ais_gtest_discover_tests target)
cmake_language(CALL gtest_discover_tests ${ARGV})

if(BUILD_CODE_COVERAGE)
Expand Down
2 changes: 2 additions & 0 deletions cmake/AISUseROCmCMake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

include(FetchContent)

# lint_cmake: -readability/wonkycase
FetchContent_Declare(
rocm-cmake
URL https://github.com/ROCm/rocm-cmake/archive/refs/tags/rocm-6.4.3.tar.gz
Expand All @@ -13,6 +14,7 @@ FetchContent_Declare(
FIND_PACKAGE_ARGS NAMES ROCmCMakeBuildTools
)
FetchContent_MakeAvailable(rocm-cmake)
# lint_cmake: +readability/wonkycase

if(rocm-cmake_SOURCE_DIR)
message(STATUS "Using fetched rocm-cmake.")
Expand Down
2 changes: 1 addition & 1 deletion rocfile/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ ais_add_libraries(
DETAIL amd
SRCS ${ROCFILE_SOURCES}
LIBINCL ${ROCFILE_INCLUDE_PATH}
SYSINCLS ${ROCFILE_SOURCE_PATH}
SYSINCLS ${ROCFILE_SOURCE_PATH}
LIBS mount
)
Loading