Skip to content
Merged
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
28 changes: 15 additions & 13 deletions share/rocmcmakebuildtools/cmake/ROCMChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,30 @@ function(rocm_check_toolchain_var var access value list_file)
set(message_type WARNING)
set(message_title "ROCMChecks WARNING")
endif()
if(access STREQUAL "MODIFIED_ACCESS")
set(cmake_module Off)
get_filename_component(base "${list_file}" DIRECTORY)
# Skip warning in cmake's built-in modules
if("${base}" STREQUAL "${CMAKE_ROOT}/Modules")
set(cmake_module On)
elseif("${base}" MATCHES ".*/CMakeFiles/${CMAKE_VERSION}$")
set(cmake_module On)
endif()
if(NOT cmake_module)
message( "
if(ROCM_WARN_TOOLCHAIN_VAR OR ROCM_ERROR_TOOLCHAIN_VAR)
if(access STREQUAL "MODIFIED_ACCESS")
set(cmake_module Off)
get_filename_component(base "${list_file}" DIRECTORY)
# Skip warning in cmake's built-in modules
if("${base}" STREQUAL "${CMAKE_ROOT}/Modules")
set(cmake_module On)
elseif("${base}" MATCHES ".*/CMakeFiles/${CMAKE_VERSION}$")
set(cmake_module On)
endif()
if(NOT cmake_module)
message( "
*******************************************************************************
*------------------------------- ${message_title} --------------------------*
Options and properties should be set on a cmake target where possible. The
variable '${var}' may be set by the cmake toolchain, either by
calling 'cmake -D${var}=\"${value}\"'
or set in a toolchain file and added with
'cmake -DCMAKE_TOOLCHAIN_FILE=<toolchain-file>'. ROCMChecks now calling:")
message(${message_type} "'${var}' is set at ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt:<line#> shown below:")
message( "*-----------------------------------------------------------------------------*
message(${message_type} "'${var}' is set at ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt:<line#> below:")
message( "*-----------------------------------------------------------------------------*
*******************************************************************************
")
endif()
endif()
endif()
endfunction()
Expand Down