diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index d57044e0462..756dfaadc13 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -30,6 +30,9 @@ function(add_api_test TEST_NAME TEST_SRC TEST_DIR) add_test(NAME ${NAME} COMMAND $ WORKING_DIRECTORY ${TEST_DIR}) add_dependencies(tests ${NAME}) add_dependencies(check ${NAME}) + if(WIN32) + target_compile_definitions(${NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) + endif() endfunction() # Workaround: C file dont work with clang-tidy right now, need a fix in rocm-cmake @@ -41,6 +44,9 @@ function(add_c_api_test TEST_NAME TEST_SRC TEST_DIR) add_test(NAME ${NAME} COMMAND $ WORKING_DIRECTORY ${TEST_DIR}) add_dependencies(tests ${NAME}) add_dependencies(check ${NAME}) + if(WIN32) + target_compile_definitions(${NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) + endif() endfunction() add_api_test(array_base test_array_base.cpp ${TEST_ONNX_DIR}) @@ -57,10 +63,6 @@ add_api_test(custom_op test_custom_op.cpp ${TEST_ONNX_DIR}) add_api_test(tf_parser test_tf_parser.cpp ${TEST_TF_DIR}) # GPU-based tests if(MIGRAPHX_ENABLE_GPU) -list(APPEND CMAKE_PREFIX_PATH /opt/rocm) -find_package(hip) add_api_test(gpu test_gpu.cpp ${TEST_ONNX_DIR}) -target_link_libraries(test_api_gpu) add_api_test(custom_op_gpu test_custom_op_gpu.cpp ${TEST_ONNX_DIR}) -target_link_libraries(test_api_custom_op_gpu) endif()