From 82fdfdb357cfe405b157d126e59183e63dddd33e Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Wed, 25 Jan 2023 00:30:02 +0530 Subject: [PATCH] SWDEV-359379 - Windows catch2: fix for rsp path issue (#137) MSbuild optimizes long args by writing it to a temp file. the temp file path was referenced incorrectly. This patch fixes the path issue of the rsp file Change-Id: I90e3e46764902025f09d7adddd80d8a7ead3b940 --- catch/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/catch/CMakeLists.txt b/catch/CMakeLists.txt index 9d5477f098..fcea0732b4 100644 --- a/catch/CMakeLists.txt +++ b/catch/CMakeLists.txt @@ -6,8 +6,7 @@ set(CMAKE_CXX_COMPILER_WORKS 1) project(hiptests) -#forcing exe per file. -set(STANDALONE_TESTS 1) +# flag to generate standalone exe per src file. message(STATUS "STANDALONE_TESTS : ${STANDALONE_TESTS}") # Check if platform and compiler are set @@ -145,6 +144,11 @@ if (WIN32) execute_process(COMMAND ${LLVM_RC_PATH} ${CMAKE_CURRENT_BINARY_DIR}/catchProp.rc OUTPUT_VARIABLE RC_OUTPUT) set(PROP_RC ${CMAKE_CURRENT_BINARY_DIR}) + # When args to linker exceeds max chars. + # msbuild writes args to a rsp file. + # This is used to reference the obj file correctly + SET(CMAKE_C_RESPONSE_FILE_LINK_FLAG "") + SET(CMAKE_CXX_RESPONSE_FILE_LINK_FLAG "") endif() if(HIP_PLATFORM MATCHES "amd" AND HIP_COMPILER MATCHES "clang")