On 10/7/2014 2:19 AM, Ruslan Baratov via CMake wrote:
Hi,

I have a problem with parallel build of project with custom command.
Custom command generates two files and depends on generator script. For
optimization purpose first file created only when not exists. This lead
to conflict, even if I "protect" custom command with a custom target and
set explicit dependencies:

Can you give an example?

add_dependencies should be what you use.
http://www.cmake.org/cmake/help/v3.0/command/add_dependencies.html
CMake does not know about the generated files. But if you have targets that depend on each other, they will build in order.

-Bill
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to