diff --git a/projects/hip-tests/catch/CMakeLists.txt b/projects/hip-tests/catch/CMakeLists.txt index 04959dd385..91b282b2fc 100644 --- a/projects/hip-tests/catch/CMakeLists.txt +++ b/projects/hip-tests/catch/CMakeLists.txt @@ -323,6 +323,7 @@ file(COPY ./external/Catch2/catch.hpp DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${ # Enable device lambda on nvidia platforms if(HIP_PLATFORM STREQUAL "nvidia") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --extended-lambda") + add_compile_options(-Xcompiler=-Wno-deprecated-declarations) endif() # Disable CXX extensions (gnu++11 etc) diff --git a/projects/hip-tests/catch/unit/c_compilation/CMakeLists.txt b/projects/hip-tests/catch/unit/c_compilation/CMakeLists.txt index 2b5d06a163..0befe53f77 100644 --- a/projects/hip-tests/catch/unit/c_compilation/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/c_compilation/CMakeLists.txt @@ -30,7 +30,7 @@ endif() # Creating Custom object file add_custom_target(devprop_c_custom COMMAND ${HIP_PATH}/bin/hipcc - -c ${CMAKE_CURRENT_SOURCE_DIR}/hipGetDeviceProp.c + -c -Wno-deprecated-declarations ${CMAKE_CURRENT_SOURCE_DIR}/hipGetDeviceProp.c -I${HIP_PATH}/include -D${PLATFORM_DEFINE} --hip-path=${HIP_PATH} diff --git a/projects/hip-tests/catch/unit/dynamicLoading/CMakeLists.txt b/projects/hip-tests/catch/unit/dynamicLoading/CMakeLists.txt index 71a014fd3e..c5aed6daa7 100644 --- a/projects/hip-tests/catch/unit/dynamicLoading/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/dynamicLoading/CMakeLists.txt @@ -34,7 +34,7 @@ hip_add_exe_to_target(NAME dynamicLoading if(HIP_PLATFORM MATCHES "amd") add_custom_target(libLazyLoad.so COMMAND ${CMAKE_CXX_COMPILER} -fPIC -lpthread -shared ${OFFLOAD_ARCH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/liblazyLoad.cc -I${CMAKE_CURRENT_SOURCE_DIR}/../../include -I${CMAKE_CURRENT_SOURCE_DIR}/../../external/Catch2 -L${HIP_PATH}/${CMAKE_INSTALL_LIBDIR} --hip-path=${HIP_PATH} -o libLazyLoad.so) elseif(HIP_PLATFORM MATCHES "nvidia") -add_custom_target(libLazyLoad.so COMMAND ${CMAKE_CXX_COMPILER} -Xcompiler -fPIC -lpthread -shared ${CMAKE_CURRENT_SOURCE_DIR}/liblazyLoad.cc -I${CMAKE_CURRENT_SOURCE_DIR}/../../include -I${CMAKE_CURRENT_SOURCE_DIR}/../../external/Catch2 -I${HIP_PATH}/include/ -o libLazyLoad.so) +add_custom_target(libLazyLoad.so COMMAND ${CMAKE_CXX_COMPILER} -Xcompiler -fPIC -lpthread -Wno-deprecated-declarations -shared ${CMAKE_CURRENT_SOURCE_DIR}/liblazyLoad.cc -I${CMAKE_CURRENT_SOURCE_DIR}/../../include -I${CMAKE_CURRENT_SOURCE_DIR}/../../external/Catch2 -I${HIP_PATH}/include/ -o libLazyLoad.so) endif() add_custom_target(bit_extract_kernel.code COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} ${CMAKE_CURRENT_SOURCE_DIR}/bit_extract_kernel.cpp -o ${CMAKE_CURRENT_BINARY_DIR}/../dynamicLoading/bit_extract_kernel.code -I${HIP_PATH}/include/ -I${CMAKE_CURRENT_SOURCE_DIR}/../../include --hip-path=${HIP_PATH} -L${HIP_PATH}/${CMAKE_INSTALL_LIBDIR}) diff --git a/projects/hip-tests/catch/unit/gcc/CMakeLists.txt b/projects/hip-tests/catch/unit/gcc/CMakeLists.txt index 5c8385cee8..5822cac19a 100644 --- a/projects/hip-tests/catch/unit/gcc/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/gcc/CMakeLists.txt @@ -6,9 +6,9 @@ set(TEST_SRC gpu.cpp ) # Creating Custom object file -add_custom_command(OUTPUT LaunchKernel.o COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/LaunchKernel.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o LaunchKernel.o) +add_custom_command(OUTPUT LaunchKernel.o COMMAND gcc -c -Wno-deprecated-declarations ${CMAKE_CURRENT_SOURCE_DIR}/LaunchKernel.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o LaunchKernel.o) add_custom_target(LaunchKernel_custom DEPENDS LaunchKernel.o) -add_custom_command(OUTPUT hipMalloc.o COMMAND gcc -c ${CMAKE_CURRENT_SOURCE_DIR}/hipMalloc.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o hipMalloc.o) +add_custom_command(OUTPUT hipMalloc.o COMMAND gcc -c -Wno-deprecated-declarations ${CMAKE_CURRENT_SOURCE_DIR}/hipMalloc.c -I${HIP_PATH}/include -D__HIP_PLATFORM_AMD__ -o hipMalloc.o) add_custom_target(hipMalloc_custom DEPENDS hipMalloc.o) add_library(LaunchKernel_lib OBJECT IMPORTED) diff --git a/projects/hip-tests/catch/unit/texture/CMakeLists.txt b/projects/hip-tests/catch/unit/texture/CMakeLists.txt index 83821c9a4b..1ea8e2593e 100644 --- a/projects/hip-tests/catch/unit/texture/CMakeLists.txt +++ b/projects/hip-tests/catch/unit/texture/CMakeLists.txt @@ -99,7 +99,7 @@ function(CheckRejectedArchs OFFLOAD_ARCH_STR_LOCAL) endfunction() # CheckAcceptedArchs add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tex_ref_get_module.code - COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} --std=c++17 ${CMAKE_CURRENT_SOURCE_DIR}/tex_ref_get_module.cc + COMMAND ${CMAKE_CXX_COMPILER} --genco ${OFFLOAD_ARCH_STR} --std=c++17 -Wno-deprecated-declarations ${CMAKE_CURRENT_SOURCE_DIR}/tex_ref_get_module.cc -o tex_ref_get_module.code -I${HIP_PATH}/include/ --hip-path=${HIP_PATH} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tex_ref_get_module.cc) @@ -155,4 +155,5 @@ hip_add_exe_to_target(NAME TextureTest TEST_SRC ${TEST_SRC} TEST_TARGET_NAME build_tests) +target_compile_options(TextureTest PRIVATE -Wno-deprecated-declarations) add_dependencies(TextureTest tex_ref_get_module)