Run pre-commit's whitespace related hooks on projects/rocr-runtime (#2130)
* Run pre-commit's whitespace related hooks on projects/rocr-runtime In order for pre-commit to be useful, everything needs to meet a common baseline. Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> * Add missing semicolon which would block compilation on big endian CPUs Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> --------- Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
This commit is contained in:
committed by
GitHub
parent
3faf36fb25
commit
bc5d48e76c
@@ -7,7 +7,7 @@ are met:
|
||||
2. Redistributions in binary form must reproduce the copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
|
||||
@@ -29,7 +29,7 @@ if (UNIX)
|
||||
/opt/local/include
|
||||
/opt/local/include/libelf
|
||||
ENV CPATH)
|
||||
|
||||
|
||||
find_library (LIBELF_LIBRARIES
|
||||
NAMES
|
||||
elf
|
||||
@@ -42,15 +42,15 @@ if (UNIX)
|
||||
/opt/local/lib64
|
||||
ENV LIBRARY_PATH
|
||||
ENV LD_LIBRARY_PATH)
|
||||
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBELF_FOUND to TRUE if all listed variables are TRUE
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibElf DEFAULT_MSG
|
||||
LIBELF_LIBRARIES
|
||||
LIBELF_INCLUDE_DIRS)
|
||||
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES elf)
|
||||
if (CMAKE_CXX_COMPILER_LOADED)
|
||||
INCLUDE(CheckCXXSourceCompiles)
|
||||
@@ -64,9 +64,9 @@ if (UNIX)
|
||||
else()
|
||||
set ( ELF_GETSHDRSTRNDX "TRUE" )
|
||||
endif(CMAKE_CXX_COMPILER_LOADED)
|
||||
|
||||
|
||||
mark_as_advanced(LIBELF_INCLUDE_DIRS LIBELF_LIBRARIES ELF_GETSHDRSTRNDX)
|
||||
|
||||
|
||||
if(LIBELF_FOUND)
|
||||
add_library(elf::elf UNKNOWN IMPORTED)
|
||||
set_property(TARGET elf::elf PROPERTY IMPORTED_LOCATION ${LIBELF_LIBRARIES})
|
||||
@@ -89,6 +89,6 @@ else()
|
||||
endif()
|
||||
set(USE_AMD_LIBELF "yes" CACHE FORCE "")
|
||||
set(AMD_ELFTOOLCHAIN_DIR ${ROCR_LIBELF_INCLUDE_DIR}/../..;${ROCR_LIBELF_INCLUDE_DIR}/../common/win32;${ROCR_LIBELF_INCLUDE_DIR}/../common)
|
||||
set(ROCR_LIBELF_INCLUDE_DIR ${ROCR_LIBELF_INCLUDE_DIR};${AMD_ELFTOOLCHAIN_DIR})
|
||||
set(LIBELF_INCLUDE_DIR ${ROCR_LIBELF_INCLUDE_DIR})
|
||||
set(ROCR_LIBELF_INCLUDE_DIR ${ROCR_LIBELF_INCLUDE_DIR};${AMD_ELFTOOLCHAIN_DIR})
|
||||
set(LIBELF_INCLUDE_DIR ${ROCR_LIBELF_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
@@ -54,10 +54,10 @@ function( get_path LIB CACHED_PATH HELP )
|
||||
find_file( FULLPATH NAMES ${ARGS_NAMES} HINTS ${${CACHED_PATH}} ${ARGS_HINTS} )
|
||||
endif()
|
||||
set( RESULT (NOT ${FULLPATH} MATCHES NOTFOUND) )
|
||||
|
||||
|
||||
# Extract path
|
||||
get_filename_component ( DIRPATH ${FULLPATH} DIRECTORY )
|
||||
|
||||
|
||||
# Check path against cache
|
||||
if( NOT "${${CACHED_PATH}}" STREQUAL "" )
|
||||
if ( NOT "${${CACHED_PATH}}" STREQUAL "${DIRPATH}" )
|
||||
|
||||
Reference in New Issue
Block a user