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.tmpYou'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 |
_______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake