On 10/20/2011 08:23 PM, Łukasz Tasz wrote: >> add_custom_target(TARGET generator >> COMMAND touch aaa.cxx >> COMMENT generate file >> ) >> >> add_custom_command(OUTPUT aaa.cxx >> COMMAND echo "command" >> DEPENDS generator bar >> This does not work^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> COMMENT "i'm just echo" >> ) >> add_executable(bar EXCLUDE_FROM_ALL c.cxx) >> add_executable(foo aaa.cxx) >> >> error is: >> [ 33%] Built target bar >> make[2]: *** No rule to make target `../generator', needed by `aaa.cxx'. >> Stop. >> make[1]: *** [CMakeFiles/foo.dir/all] Error 2 > > one my mistake, which is slightly changing the output: > > add_custom_target(generator > COMMAND touch aaa.cxx > COMMENT generate file > ) > add_custom_command(OUTPUT aaa.cxx > COMMAND echo "command" > DEPENDS generator bar > COMMENT "i'm just echo" > ) > add_executable(bar EXCLUDE_FROM_ALL c.cxx) > add_executable(foo aaa.cxx) > > [ 0%] generate file > [ 25%] Built target generator > [ 50%] Built target bar > make[3]: *** No rule to make target `generator', needed by `aaa.cxx'. Stop. > > > regards > Lukasz
Which version of CMake do you use? This issue should have been resolved in 2.8.4, see [1]. If it still persists, could you come up with a minimal but complete example for further investigation? Regards, Michael [1] http://public.kitware.com/Bug/view.php?id=12057 -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake