[CMake] Creating a custom target on Windows - strange problem

Arjen Markus arjen.markus at wldelft.nl
Wed Sep 13 02:20:46 EDT 2006


Brad King wrote:

>Arjen Markus wrote:
>  
>
>>    add_custom_target(${CMAKE_CURRENT_BINARY_DIR}/${file} ALL
>>    
>>
>[snip]
>  
>
>>When I run this in ..\build, using
>>    cmake -G "NMake makefiles" ..\src
>>    
>>
>[snip]
>  
>
>>CMake Error: Cannot open file for write:
>>C:/arjen/plplot-5.6.1-cmake/testcbs/build/CMakeFiles/C:/arjen/plplot-5.6.1-cmake/testcbs/build/x02.dir/build.make.tmp
>>    
>>
>
>You're creating a high-level target named
>"C:/arjen/plplot-5.6.1-cmake/testcbs/build/x02" which is invalid.  I'll
>look into adding a better diagnostic for this.
>
>Use ADD_CUSTOM_COMMAND for each of your files and an ADD_CUSTOM_TARGET
>to drive them:
>
>http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F
>
>  
>

Thanks, this explains what is going on and the solution you offer should be
easy to implement.

Regards,

Arjen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060913/e95d224e/attachment.html


More information about the CMake mailing list