[CMake] WORKING_DIRECTORY ignored for ADD_CUSTOM_COMMAND on Visual Studio?
Brad King
brad.king at kitware.com
Thu Jun 26 11:46:27 EDT 2008
Martin Apel wrote:
> WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
For VS this is the default working directory if no WORKING_DIRECTORY is
given.
> This calls a perl script to generate a bunch of Fortran files as needed.
> This script has to run in the output directory. I have checked the
> generated .vcproj file and it doesn't contain anything related to
> the working directory for this command. I modified the command to use
> COMMAND ${CMAKE_COMMAND} -E chdir ${PERL_EXECUTABLE}
> ${CMAKE_SOURCE_DIR}/scripts/createFortAccessors.pl
> and now it works properly. But still, my impression is, that the Visual
> Studio generator ignores this parameter.
Have you tried a custom command that just prints the working directory
to see where it is?
-Brad
More information about the CMake
mailing list