[CMake] Creating a custom target on Windows - strange problem
Brad King
brad.king at kitware.com
Tue Sep 12 13:05:47 EDT 2006
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
-Brad
More information about the CMake
mailing list