Mueller-Roemer, Johannes Sebastian
2014-Jul-23 18:45 UTC
[LLVMdev] [patch] EXPORTED_SYMBOL_FILE using mingw and cmake
The new patch works fine, but considering the discussion on the CMake bug tracker, I'm would say that TO_NATIVE_PATH shouldn't be used at all. ________________________________________ From: Dan Liew [dan at su-root.co.uk] Sent: Wednesday, July 23, 2014 10:38 AM To: Mueller-Roemer, Johannes Sebastian Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] [patch] EXPORTED_SYMBOL_FILE using mingw and cmake Okay I guess the test would be something like this then if (CMAKE_GENERATOR STREQUAL "MinGW Makefiles") # mingw workaround, as file(TO_NATIVE_PATH ...) is implemented incorrectly # See http://public.kitware.com/Bug/print_bug_page.php?bug_id=5939 string(REPLACE / \\ export_file_backslashes "${export_file}") else() file(TO_NATIVE_PATH "${export_file}" export_file_backslashes) endif() I've written this into patch applied against trunk. Could you test this (I don't use MinGW and don't have time to set it up) and confirm it works? It would be great if you could test that the file(TO_NATIVE_PATH ...) still gets used for the MSYS-Makefiles and Cygwin generators. It's also good to see some activity on the CMake bug report :) If it all works then I can commit on your behalf. Thanks, Dan
Dan Liew
2014-Jul-23 19:30 UTC
[LLVMdev] [patch] EXPORTED_SYMBOL_FILE using mingw and cmake
On 23 July 2014 19:45, Mueller-Roemer, Johannes Sebastian <Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:> The new patch works fine, but considering the discussion on the CMake bug tracker, I'm would say that TO_NATIVE_PATH shouldn't be used at all.I'm happy either way. A patch using string(REPLACE ...) instead for all cases I think would be fine provided it has a comment saying something like... # Don't use file(TO_NATIVE_PATH ...) it doesn't work correctly when generating MingW Makefiles string(REPLACE / \\ export_file_backslashes "${export_file}") so that someone doesn't try and start using file(TO_NATIVE_PATH ...) again at some point. It would also be cleaner I guess.
Mueller-Roemer, Johannes Sebastian
2014-Sep-22 12:40 UTC
[LLVMdev] [patch] EXPORTED_SYMBOL_FILE using mingw and cmake
Our exchange on the zlib thread reminded me, that we didn't finish the EXPORT_SYMBOL_FILE patch before my vacation. Here is my newest version, which mentions the bug and always uses string(REPLACE) -- Johannes S. Mueller-Roemer, MSc Wiss. Mitarbeiter - Interactive Engineering Technologies (IET) Fraunhofer-Institut für Graphische Datenverarbeitung IGD Fraunhoferstr. 5 | 64283 Darmstadt | Germany Tel +49 6151 155-606 | Fax +49 6151 155-139 johannes.mueller-roemer at igd.fraunhofer.de | www.igd.fraunhofer.de -----Original Message----- From: Dan Liew [mailto:dan at su-root.co.uk] Sent: Wednesday, July 23, 2014 21:31 To: Mueller-Roemer, Johannes Sebastian Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] [patch] EXPORTED_SYMBOL_FILE using mingw and cmake On 23 July 2014 19:45, Mueller-Roemer, Johannes Sebastian <Johannes.Sebastian.Mueller-Roemer at igd.fraunhofer.de> wrote:> The new patch works fine, but considering the discussion on the CMake bug tracker, I'm would say that TO_NATIVE_PATH shouldn't be used at all.I'm happy either way. A patch using string(REPLACE ...) instead for all cases I think would be fine provided it has a comment saying something like... # Don't use file(TO_NATIVE_PATH ...) it doesn't work correctly when generating MingW Makefiles string(REPLACE / \\ export_file_backslashes "${export_file}") so that someone doesn't try and start using file(TO_NATIVE_PATH ...) again at some point. It would also be cleaner I guess. -------------- next part -------------- A non-text attachment was scrubbed... Name: AddLLVM.cmake.patch Type: application/octet-stream Size: 964 bytes Desc: AddLLVM.cmake.patch URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140922/bc4bf89d/attachment.obj>