From 822e3b15e2491ce8f3bd76c5b3ac70be695108e4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 31 Aug 2018 14:17:00 -0400 Subject: SL-957: Use tar -C instead of changing tar's WORKING_DIRECTORY. Seems VIEWER_SYMBOL_FILE arrives from build.sh as a relative pathname, so passing that pathname to tar when we run tar with WORKING_DIRECTORY confuses it. But if we use tar's -C switch, we can achieve the effect we want (no leading directory prefixes in the tarball) without WORKING_DIRECTORY. Thing is, we have to run the desired directory through cygpath first, which is why we went with WORKING_DIRECTORY in the first place. --- indra/newview/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 10210cd918..a54ee7279c 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2271,6 +2271,9 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE execute_process(COMMAND "cygpath" "-u" "${VIEWER_SYMBOL_FILE}" OUTPUT_VARIABLE VIEWER_SYMBOL_FILE_CYGWIN OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND "cygpath" "-u" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" + OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN + OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}" # Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.bz2; # testing a string suffix is painful enough in CMake language that @@ -2279,8 +2282,9 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE ARGS "cjf" "${VIEWER_SYMBOL_FILE_CYGWIN}" + "-C" + "${PARENT_DIRECTORY_CYGWIN}" "secondlife-bin.pdb" - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-bin.pdb" COMMENT "Packing viewer PDB into ${VIEWER_SYMBOL_FILE_CYGWIN}" ) -- cgit v1.2.3