[CMake] Wrong behavior with 3.2.0-rc2

Nils Gladitz nilsgladitz at gmail.com
Fri Mar 6 06:57:04 EST 2015


On 03/06/2015 10:22 AM, Pere Mato Vila wrote:
> Using version 3.2.0-rc2 on the Mac OS X 10.10 with the make generator.
> The following example executes the custom to create A.txt and B.txt
> twice when building with make -jN
>
> ————————-
> cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
> add_custom_target(Main ALL DEPENDS A.txt B.txt)
> add_custom_command(OUTPUT A.txt B.txt
>                     COMMAND touch A.txt
>                     COMMAND touch B.txt)
>
> ————————-
> $ make clean
> $ make -j10
> -- Configuring done
> -- Generating done
> -- Build files have been written to:
> /Users/mato/Development/ROOT/build.master/temp
> [100%] [100%] *Generating A.txt, B.txt*
> *Generating A.txt, B.txt*
> [100%] Built target Main
>
>
> This is not the case for version 3.1.3.

This seems to be the case since
[644b4688d71cc52f8499d6103495de0909319557] Makefile: Fix rebuild with 
multiple custom command outputs (#15116)

Nils


More information about the CMake mailing list