[CMake] Visual Studio 2010 generator and custom command

Bill Hoffman bill.hoffman at kitware.com
Wed Sep 29 09:50:26 EDT 2010


On 9/29/2010 9:38 AM, elizabeta petreska wrote:
> If I use such a script for comparing time stamps of input and output
> files, I would need to rewrite every cmakelists.txt that uses
> add_custom_command, and execute the needed commands only if input file
> is older than output,or maybe I did not understand you idea with the
> script.  This seems like a lot of mess for something that cmake should do.
>
> Also is anybody experiencing this issue with vs2010 generator ?
> Can anybody confirm that this is bug with vs2010 generator, and maybe
> some workaround ?
>
> One more observation:
> This problem seems to happen only when the output file goes to
> subdirectory in PROJECT_BINARY_DIR, in the example the subdirectory is
> PROJECT_BINARY_DIR/$(ConfigurationName).
>
> If I put the generated file to go straight under PROJECT_BINARY_DIR than
> everything works ok. Also if I put the generated files to go under
> PROJECT_SOURCE_DIR or its subdirectories everything works well.
>
> Thanks


}/$(ConfigurationName)/
should use:
${CMAKE_CFG_INTDIR}


That might be the problem.

-Bill


More information about the CMake mailing list