[CMake] WORKING_DIRECTORY ignored for ADD_CUSTOM_COMMAND on VisualStudio?

Martin Apel martin.apel at simpack.de
Fri Jun 27 09:38:30 EDT 2008


This is it! It seems to work correctly, when using cd instead of "cd .". 
It seems I misinterpreted a command line parameter of a linker call as 
the directory output. Sorry for the confusion.
I'm not exactly in love with Windows ;-)

Martin

David Cole wrote:
> Try just "cd" -- cd . does not give any output at all, it's just a 
> no-op... cd without any arguments prints the current working directory 
> just like pwd...
>
>
>
>
> On Fri, Jun 27, 2008 at 9:20 AM, Bill Hoffman 
> <bill.hoffman at kitware.com <mailto:bill.hoffman at kitware.com>> wrote:
>
>     Martin Apel wrote:
>
>         Bill Hoffman wrote:
>
>             Martin Apel wrote:
>
>                 Hi Brad,
>
>                 this is kind of difficult under Windows, as far as I
>                 know. I have MSys installed on my machine, but the pwd
>                 "command" is not really a command (i.e. .exe) under
>                 MSys, but a shell script, which invokes
>                 the shell command "pwd". Windows sees the file with
>                 the "pwd" command in C:\MSys\bin as an ordinary file,
>                 not an executable. So I cannot call this from within
>                 ADD_CUSTOM_COMMAND. As I am no Windows expert, I
>                 haven't found any other way. Can you recommend a way,
>                 how to do this?
>
>
>             cd .
>
>         Hi Bill,
>
>         this doesn't result in any output at all:
>         ADD_CUSTOM_COMMAND (COMMAND cd .
>                                                        
>          WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
>
>         I think "cd ." cannot work, because there is no cd.exe under
>         Windows. I even tried "C:/WINNT/System32/cmd.exe /C cd .", but
>         this didn't work either.
>
>
>     It does work.   The output is going to be in that html file that
>     visual studio creates when it does the build.  I think you have to
>     cntrl-click to see it.
>
>     -Bill
>
>     _______________________________________________
>     CMake mailing list
>     CMake at cmake.org <mailto:CMake at cmake.org>
>     http://www.cmake.org/mailman/listinfo/cmake
>
>


-- 

Martin Apel                                     Tel:     0049 8153 9288-47
Software Architect                              E-Mail:  martin.apel at simpack.de

INTEC GmbH                                      Tel:     0049 8153 9288-0
Argelsrieder Feld 13                            Fax:     0049 8153 9288-11
82234 Wessling                                  E-Mail:  intec at simpack.de
Germany                                         URL:     http://www.simpack.com


____________
Virus checked by G DATA AntiVirus
Version: AVKA 18.309 from 27.06.2008




More information about the CMake mailing list