On Sun, Aug 15, 2010 at 2:19 PM, Magnus Therning <[email protected]> wrote: > On 15/08/10 22:11, SK wrote: >> When using the D language compiler 'dmd' on windows, I'm stuck with a >> linker that gets confused with object file names like foo.c.obj. The >> linker can only handle a single dot in the object file name, as in >> foo.o >> >> How can I set target names to just be the base name without the source >> extension? I need to do this in the language support module, e.g. >> Modules\Platform\Windows-dmd.cmake, so that users don't need to hack >> this in their own CMakeLists.txt files. > > Instead of adding '.obj' to the full filename, first extract the > filename-extension (see get_filename_component()) and then add '.o' to that. >
Thanks Magnus, but in language support module, I don't see a way to do this. None of the existing modules specify how to create the output name. Instead they merely specify the name of the extension, e.g. ".obj". How can I use the get_filename_component() in a generic way that covers all targets? _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
