Re: [CMake] Parallel build with custom command

2014-10-08 Thread Ruslan Baratov via CMake
On 07-Oct-14 22:34, Brad King wrote: On 10/07/2014 12:14 PM, Ruslan Baratov via CMake wrote: Yes, that's why second file always modified. So assume I have a script that generates a lot of *.cpp files. I modify script so it only change one file, one file modified - one file recompiled. So what I

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Brad King
On 10/07/2014 12:14 PM, Ruslan Baratov via CMake wrote: > Yes, that's why second file always modified. So assume I have a script > that generates a lot of *.cpp files. I modify script so it only change > one file, one file modified - one file recompiled. So what I trying to > do is optimization

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Ruslan Baratov via CMake
On 07-Oct-14 19:14, Bill Hoffman wrote: On 10/7/2014 10:26 AM, Ruslan Baratov wrote: I'm expecting 1 message `Script run`, but I have 5 messages. If I modify `generate.cmake` script so it always write the file then everything works fine. Ah OK, I see. Your depend never gets up to date. If you

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Bill Hoffman
On 10/7/2014 10:26 AM, Ruslan Baratov wrote: I'm expecting 1 message `Script run`, but I have 5 messages. If I modify `generate.cmake` script so it always write the file then everything works fine. Ah OK, I see. Your depend never gets up to date. If you touch generate.cmake, and the file alre

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Ruslan Baratov via CMake
On 07-Oct-14 18:00, Bill Hoffman wrote: 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 ex

Re: [CMake] Parallel build with custom command

2014-10-07 Thread Bill Hoffman
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 "p

[CMake] Parallel build with custom command

2014-10-06 Thread Ruslan Baratov via CMake
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